summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsnmpd/modules/snmp_hostres
Commit message (Collapse)AuthorAgeFilesLines
* Import patch to fix hostres high CPU usageRenato Botelho2017-10-161-1/+2
| | | | Imported from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209368
* MFC r314987-r314989, r314993-r314994, r315046-r315049, r315102araujo2017-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r314987: Use nitems() from sys/param.h. Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944 r314988: Use nitems() from sys/param.h. Reviewed by: ume MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9938 r314989: Use nitems() from sys/param.h and also remove the cast. Reviewed by: markj MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9937 r314993: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9936 r314994: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9940 r315046: Use nitems() from sys/param.h Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941 r315047: Use nitems() from sys/param.h. Reviewed by: np MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9945 r315048: Use nitems() from sys/param.h. MFC after: 3 weeks. r315049: Bring back the cast removed in my previous commit to allow us build vmstat with WARNS 2. This cast was first introduced at r87690. Reported by: bde, pfg and ngie MFC after: 3 weeks. r315102: Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943
* MFC r311744,r312328,r312329,r312330:ngie2017-02-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311744: Document bsd.snmpmod.mk from a high-level r312328: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. r312329: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 r312330: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP
* MFC r311740:ngie2017-01-161-2/+3
| | | | | | | | Improve the smilint target in the hostres and mibII modules - Mark the smilint target .PHONY so it's always executed when requested - Leverage .PATH for BMIBS instead of spelling the path out longhand for them
* MFC r311741,r311761:ngie2017-01-161-0/+3
| | | | | | | | | | | | | | | | | r311741: Add a REVISION section to track changes for the hostres module There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at r311761: Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file This change also documents the modification harti made to a handful of objects in r122758 (the max OCTET STRING width was increased from 15 to 31 octets)
* MFC r311739:ngie2017-01-131-1/+1
| | | | | | Use SRCTOP instead of spelling out the full path with .CURDIR This helps condense the output for CFLAGS and .PATH
* MFC r311393:ngie2017-01-091-2/+2
| | | | | OS_getSystemUptime: use nitems for calculating the number of elements in a sysctl mib instead of hardcoding the number 2
* MFC r310648:ngie2016-12-311-2/+2
| | | | style(9): clean up trailing whitespace
* MFC r310666,r310675:ngie2016-12-317-20/+23
| | | | | | | | | | | | | | | | r310666: style(9) fixes - Clean up trailing whitespace - Fix variable type alignment in storage_OS_get_swap(..) r310675: Fix the build by moving the initializers for len/nswapdev down below the declarations Pointyhat to: ngie
* MFC r305855, r306297, r306300, r306312-r306313marcel2016-12-111-1/+1
| | | | | | | | | | | | | | When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same object files (case-insensitivity speaking). This is the case for object files compiled with -fpic and shared libraries. The former uses an extension of ".So", and the latter an extension ".so". Rename shared object files from *.So to *.pico to match what NetBSD does. Also: o Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s o Add entry to UPDATING o Document .pico extension
* DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-02-241-56/+0
| | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division
* Rename P_KTHREAD struct proc p_flag to P_KPROC.kib2016-02-091-1/+1
| | | | | | | | I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL() definition. Suggested by: jhb Sponsored by: The FreeBSD Foundation
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* snmp_hostres(3): Fix buffer overflow.pfg2015-07-201-1/+1
| | | | | | | Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 MFC after: 3 days
* new dependssjg2015-06-161-1/+0
|
* Add META_MODE support.sjg2015-06-131-0/+84
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-4/+3
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-192-1/+2
| |\
| * | Updated dependenciessjg2014-05-161-0/+2
| | |
| * | sync from headsjg2013-04-121-19/+13
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| * | | Updated/new Makefile.dependsjg2012-11-081-0/+4
| | | |
| | | |
| | \ \
| *-. \ \ Sync from headsjg2012-11-043-2/+8
| |\ \ \ \
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+79
| | |/ / / | |/| | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | Convert usr.sbin to LIBADDbapt2014-11-251-2/+1
| | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | Fix the following -Werror warnings from clang 3.5.0, while buildingdim2014-11-221-2/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bsnmpd's snmp_hostres module: usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^~~ labs usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^~~ labs Since tm::tm_gmtoff is a long, use labs(3) instead. MFC after: 3 days
* | | | use .Mt to mark up email addresses consistently (part2)bapt2014-06-201-1/+1
| |_|/ |/| | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
* | | hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fstrociny2013-03-251-19/+13
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | size and usage in hrStorageAllocationUnits. If the file system has more than 2^31 allocations it can not be shown correctly and the meters are useless. In such cases follow net-snmp behaviour and increase hrStorageAllocationUnits so the values fit under INT_MAX. PR: bin/177183 Submitted by: Eugene Grosbein egrosbein rdtc.ru MFC after: 2 weeks
* | In snmp_hostres, device_map table is used for consistent device tabletrociny2012-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indexing. When a device has gone it is not removed from device_map table but just its entry_p field is set to NULL. So when traversing device_map in disk_OS_get_ATA_disks() and disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the bsnmpd crash is possible when a removed map entry is dereferenced. Before the fix, for disk_OS_get_ATA_disks() the crash could be easily reproduced running: atacontrol detach ata1 The crash was not observed in disk_OS_get_MD_disks() because currently snmp_hostres does no see md(4) disks: to get the device list it uses devinfo(3), which does not return md devices. Reported by: Miroslav Lachman 000.fbsd quip.cz MFC after: 1 week
* | Do not count kernel threads as processes for hrSystemProcesses OID.glebius2012-09-111-1/+1
| | | | | | | | | | PR: bin/160494 Submitted by: Jeremy Chadwick <freebsd jdc.parodius.com>
* | Spelling.glebius2012-09-111-1/+1
|/
* Spelling fixes for usr.sbin/uqs2011-12-304-5/+5
|
* Apparently, "ada" drives are better treated similarly to "da" drives.ivoras2011-10-241-1/+2
|
* It seems that the warning is much less severe than its message says. Theivoras2011-10-241-1/+1
| | | | device is certainly added to the list after the first pass.
* Fix typoivoras2011-10-242-2/+2
| | | | MFC after: 1 month
* Use full buffer size in read(2) call, there is no need to preserve theae2011-07-111-11/+5
| | | | | | | | | | | | | | | | last byte of the buffer. Since we call refresh_device_tbl() for any devctl event types - no need to check the first byte of buffer. Remove these checks. Also remove logging for the case of unknown devd message. It incorrectly triggers when all devctl events are not fit into one buffer and part of unread data will be read in the next pass. When length of data readed from devctl is equal to sizeof(buf), then try to read from socket again, to read full data. MFC after: 2 weeks
* [mdoc] Fixed .Dt call.ru2011-05-251-1/+1
|
* Fix CPU load reporting independent of scheduler used.uqs2010-10-281-204/+128
| | | | | | | | | | | | | | | | | | | | | | - Sample CPU usage data from kern.cp_times, this makes for a far more accurate and scheduler independent algorithm. - Rip out the process list scraping that is no longer required. - Don't update CPU usage sampling on every request, but every 15s instead. This makes it impossible for an attacker to hide the CPU load by triggering 4 samplings in short succession when the system is idle. - After reaching the steady-state, the system will always report the average CPU load of the last 60 sampled seconds. - Untangling of call graph. PR: kern/130222 Tested by: Julian Dunn <jdunn@aquezada.com> Gustau Pérez <gperez@entel.upc.edu> Jürgen Weiß <weiss@uni-mainz.de> MFC after: 2 weeks I'm unsure if some MIB standard states this must be the load average for, eg. 300s, it looks like net-snmp isn't even bothering to implement the CPU load reporting at all.
* Make failed open of /dev/mdctl in the bsnmpd hostres module non-fatal.simon2010-07-241-2/+5
| | | | | | | This makes it possible to use the hostres module when bsnmpd is not running as root. MFC after: 1 week
* mdoc: consistently spell our email addresses <foo@FreeBSD.org>uqs2010-05-191-1/+1
| | | | Reviewed by: ru
* Port all applications in usr.sbin/ from libulog to utmpx.ed2010-01-132-4/+3
|
* Let the snmp_hostres module use utmpx.ed2009-12-243-30/+9
| | | | Approved by: harti
* Collapse devinfo_state_t with device_state_t in order to avoid aattilio2009-11-151-4/+4
| | | | | | | structure replication and improve manteneability. Reviewed by: jhb, imp Tested by: Riccardo Torrini <riccardo at torrini dot org>
* add zfs oid to bsnmpdkmacy2009-05-171-0/+1
| | | | | PR: bin/129360 Submitted by: Ulrich Spoerlein
* ! is a generic info messagexride2007-03-091-0/+1
| | | | | | Reviewed by: harti Approved by: harti MFC after: 2 weeks
* Revise markup.ru2006-09-301-11/+14
|
* Reduce the memory requirements for the tables by (1) using malloced stringsharti2006-07-1411-282/+604
| | | | | | | | | instead of maximum sized arrays embedded in the table structures and (2) using pointers to constant oids instead of copying the oid into each table structure. This also fixes indexing in the case when a string used for indexing is longer than the maximum size allowed in the MIB. Submitted by: Victor Cruceru <soc-victor@>
* Expand contractions.joel2006-02-011-1/+1
|
OpenPOWER on IntegriCloud