Commit Graph

664 Commits

Author SHA1 Message Date
Doug MacEachern e56e760d58 port proc_port to freebsd4 2006-01-02 22:15:24 +00:00
Doug MacEachern 6dbaff7b07 net_connection_list works on freebsd4 too 2006-01-02 22:04:19 +00:00
Doug MacEachern 7745201227 route_list works on freebsd4 too 2006-01-02 22:00:32 +00:00
Doug MacEachern 6c3eda260b proc_time impl for freebsd4 2006-01-02 21:51:02 +00:00
Doug MacEachern 3d4267a6a7 workaround freebsd lack of per-cpu metrics 2006-01-02 18:45:49 +00:00
Doug MacEachern e2aeb5aac0 remove unused code 2006-01-02 17:18:55 +00:00
Doug MacEachern 8e8cd18e16 avoid int overflow in mem_get 2005-12-31 20:35:56 +00:00
Doug MacEachern b5785ebec1 fix cpu_list for multi cpus on darwin 2005-12-31 19:51:04 +00:00
Doug MacEachern d35e406067 fix proc_list for freebsd4 2005-12-31 18:46:55 +00:00
Doug MacEachern 526ee37bcb fix compile on freebsd 4.x 2005-12-31 18:43:09 +00:00
Doug MacEachern 7820b451cc make sigar_main more portable 2005-12-31 18:29:55 +00:00
Doug MacEachern 55a1c28a1a readability++ 2005-12-21 04:58:02 +00:00
Doug MacEachern 70f18204dd change get_if_table to take iftable arg 2005-12-21 02:49:18 +00:00
Doug MacEachern cd375c7337 change get_adapters_info to take adapter arg 2005-12-21 02:45:38 +00:00
Doug MacEachern 361af1a2cf re-use ifconf_buf for GetAdaptersInfo 2005-12-21 02:31:06 +00:00
Doug MacEachern 0d2a149924 refactor interaction with windows dlls 2005-12-20 23:09:34 +00:00
Doug MacEachern e94cd5cdb0 get_if_entry=NULL on lookup failure 2005-12-20 00:10:57 +00:00
Doug MacEachern 39c1337f71 make GetIfTable wrapper reusable and re-use allocated buffer 2005-12-20 00:09:32 +00:00
Doug MacEachern 258ed193ca add GetIfEntry pointer 2005-12-19 22:49:12 +00:00
Doug MacEachern 2d831a99f4 net_interface_config.mtu for AIX, HPUX and Solaris 2005-12-19 22:00:39 +00:00
Doug MacEachern 3a2fcef755 open/close sigar 2005-12-16 02:10:16 +00:00
Doug MacEachern 0f465e7851 rid warnings 2005-12-15 20:22:01 +00:00
Doug MacEachern 9e2d3a3fe0 start of an external exe to deal with permissions issues 2005-12-15 05:36:34 +00:00
Doug MacEachern c04af84fd3 fix win32 compile 2005-12-15 00:20:27 +00:00
Doug MacEachern c4d439f609 add more version fields 2005-12-14 23:48:28 +00:00
Doug MacEachern eb7a2a10f9 version file for native stuff 2005-12-14 23:40:23 +00:00
Doug MacEachern 739ea91d90 chop self_path rather than ptr 2005-12-14 18:55:10 +00:00
Doug MacEachern 6f67476977 allow SIGAR_PATH env var to set self_path 2005-12-14 18:44:01 +00:00
Doug MacEachern 5fc7cc7134 move sigar_get_self_path to sigar_util 2005-12-14 18:40:13 +00:00
Doug MacEachern dc3eceb517 move self_path to the base sigar_t 2005-12-14 18:35:19 +00:00
Doug MacEachern d50e4efe42 add dir_usage, recursive version of dir_stat 2005-12-14 02:56:13 +00:00
Doug MacEachern d695f3de06 only need 1 sigar_dir_stat_get wrapper 2005-12-14 02:31:57 +00:00
Doug MacEachern 19d9d3fe5f support recursion in dir_stat (win32) 2005-12-14 02:17:25 +00:00
Doug MacEachern e058d29cc3 minor refactor towards recursive dir_stat impl 2005-12-14 02:15:04 +00:00
Doug MacEachern f8060d5cf9 macroize dir_stat_warn 2005-12-14 02:11:54 +00:00
Doug MacEachern 94939e887b change log msg 2005-12-14 02:09:06 +00:00
Doug MacEachern 6f6f92fb42 support recursion in dir_stat 2005-12-14 01:57:54 +00:00
Doug MacEachern 7eb8286364 minor refactor towards recursive dir_stat impl 2005-12-14 01:47:53 +00:00
Doug MacEachern 3e84be001a add dir_stat.disk_usage 2005-12-14 01:34:25 +00:00
Doug MacEachern ab3abd5119 add dir_stat.disk_usage 2005-12-14 01:28:44 +00:00
Doug MacEachern 9ca64171c2 move sigar_getword to sigar_util 2005-12-13 01:18:30 +00:00
Doug MacEachern f2d6a8f3b1 rehash when table size changes 2005-12-13 01:07:43 +00:00
Doug MacEachern 8bc0f0d245 always init interface list for stats 2005-12-12 18:01:28 +00:00
Doug MacEachern 9414b07011 cache args when using ucb/ps 2005-12-10 02:33:49 +00:00
Doug MacEachern 50f8e4e4b6 experiment w/ using /usr/ucb/ps for proc_args if EACCES 2005-12-10 01:01:44 +00:00
Doug MacEachern b801cbc500 remove unused code 2005-12-09 21:57:00 +00:00
Doug MacEachern b18c9b2c3d remove unused code 2005-12-09 21:55:06 +00:00
Doug MacEachern 005fea17c2 avoid memcpy of kstat_io_t in kstat_read 2005-12-09 21:10:56 +00:00
Doug MacEachern 225e8e4da4 check return value of kstat_chain_update 2005-12-09 21:03:14 +00:00
Doug MacEachern 42cbd0df47 kstat_chain_update in first call to get_multi_kstats 2005-12-09 20:33:20 +00:00
Doug MacEachern 85c55bc8ba add more logging 2005-12-09 20:02:44 +00:00
Doug MacEachern fb475be338 always use sigar_kstat_update rather than kstat_chain_update directly 2005-12-09 19:24:40 +00:00
Doug MacEachern b08443a84a fix freebsd compile 2005-12-05 18:45:37 +00:00
Doug MacEachern 09da6e96e0 filter out auto-mounted filesystems 2005-12-05 18:43:42 +00:00
Doug MacEachern 79bc88de67 filter network interfaces to just loopback and ethernet 2005-12-05 18:38:11 +00:00
Doug MacEachern fc24578d83 fix net_route_list for solaris 10 2005-12-03 01:31:54 +00:00
Doug MacEachern 82e6f77d0e convert cpu_info.cache_size to KB 2005-12-02 04:56:57 +00:00
Doug MacEachern b228641334 fix darwin compile 2005-12-02 02:32:07 +00:00
Doug MacEachern e0bc9674b5 fix freebsd compile 2005-12-02 02:30:53 +00:00
Doug MacEachern abf6d0735f add cpu_info.cache_size 2005-12-02 01:22:16 +00:00
Doug MacEachern 1cf03e463a unhardcode powerpc as the cpu model 2005-12-02 01:12:51 +00:00
Doug MacEachern c7061cc660 get cpu mhz for darwin 2005-12-02 01:03:03 +00:00
Doug MacEachern 547a30b20b keep better track of /proc/*/stat fields 2005-11-28 18:24:11 +00:00
Doug MacEachern a6f687a894 stub proc_state.processor 2005-11-28 17:48:57 +00:00
Doug MacEachern b83898fb21 add proc_mem.page_faults 2005-11-28 17:40:51 +00:00
Doug MacEachern 591f07422d fix file_system_usage.free_files 2005-11-28 17:29:26 +00:00
Doug MacEachern f448844f87 fix file_system_usage.free_files 2005-11-28 15:41:32 +00:00
Doug MacEachern 0d38b8332d stub proc_mem fault metrics 2005-11-23 18:00:02 +00:00
Doug MacEachern 612c5ca97e add proc_mem.page_faults 2005-11-23 17:51:19 +00:00
Doug MacEachern 530157168d add proc_mem page fault metrics 2005-11-23 17:39:28 +00:00
Doug MacEachern 5df9096cba add proc_state.processor 2005-11-23 03:09:59 +00:00
Doug MacEachern ef15aa3434 stub proc_state.processor 2005-11-23 01:28:51 +00:00
Doug MacEachern 92a33c7caf use procsinfo64 and get proc_state.priority from that 2005-11-23 01:24:29 +00:00
Doug MacEachern 6b7a36f521 add proc_state.processor 2005-11-23 01:16:52 +00:00
Doug MacEachern 6f791278db stub proc_state.threads 2005-11-23 00:39:37 +00:00
Doug MacEachern 059b8554ac add proc_state.threads 2005-11-22 22:26:37 +00:00
Doug MacEachern 60271c8ac9 add proc_state.threads 2005-11-22 21:55:41 +00:00
Doug MacEachern bb5aa9c263 add proc_state.threads 2005-11-22 21:48:52 +00:00
Doug MacEachern fb61a2ebb0 add proc_state.threads metric 2005-11-22 21:45:45 +00:00
Doug MacEachern 0e912b962c set net_interface_config.type 2005-11-18 20:03:44 +00:00
Doug MacEachern ab3c15d2e7 constify nic types 2005-11-18 19:54:23 +00:00
Doug MacEachern bb478479b2 add support for IFF_SLAVE flag (used by vmnic) 2005-11-18 18:26:52 +00:00
Doug MacEachern 72841ad4c2 fillin net_interface_config.type 2005-11-18 18:08:19 +00:00
Doug MacEachern 35d2d7f5f8 on linux certain interfaces such as VMware vmnic
are not returned by ioctl(SIOCGIFCONF).
check /proc/net/dev for any ioctl missed.
2005-11-18 01:15:54 +00:00
Doug MacEachern 05624b41cb dont bail in net_interface_config_get if address query fails (e.g. vmnic1) 2005-11-17 02:50:37 +00:00
Doug MacEachern 95a824c653 rid -Wall warnings 2005-11-09 23:57:36 +00:00
Doug MacEachern 7118069a1b no dmalloc here 2005-11-09 23:14:05 +00:00
Doug MacEachern db7081e550 plug leak in sigar_cache_destroy 2005-11-09 19:45:52 +00:00
Doug MacEachern 3756cbd6b8 plug mem leak when creating fsdev cache 2005-11-09 19:35:28 +00:00
Doug MacEachern 4f19d45af9 wrap free() for use w/ dmalloc 2005-11-09 19:31:02 +00:00
Doug MacEachern 78d620897b include dmalloc 2005-11-09 19:29:58 +00:00
Doug MacEachern be7bfa24cd dont include malloc.h ifdef DMALLOC 2005-11-09 19:20:44 +00:00
Doug MacEachern 100aed0cb3 integrate dmalloc.h 2005-11-09 18:26:10 +00:00
Doug MacEachern 54754b2711 add NULL checks to fqdn_get 2005-11-08 19:15:41 +00:00
Doug MacEachern 147c931d7d fail gracefully if no perf counters are found for disk i/o metrics 2005-11-08 18:16:03 +00:00
Doug MacEachern 6a47768169 proc_mem.rss = proc_mem.resident 2005-11-01 19:15:23 +00:00
Doug MacEachern fc6592f379 proc_mem.resident same as proc_mem.rss 2005-11-01 19:11:13 +00:00
Doug MacEachern ac891b330e proc_mem.resident = proc_mem.rss 2005-11-01 19:06:31 +00:00
Doug MacEachern 85527ccbf1 add proc_mem.resident (same as rss) 2005-11-01 18:52:50 +00:00
Doug MacEachern d146b6bb65 add proc_mem.resident for win32 2005-11-01 18:48:33 +00:00
Doug MacEachern 5692677e67 fix for bge metrics 2005-10-24 19:01:27 +00:00
Doug MacEachern 7588002069 fix who_wts 2005-10-10 17:00:30 +00:00
Doug MacEachern 3382767c07 add support for bge network interface metrics 2005-10-09 01:14:34 +00:00
Doug MacEachern 15d139a8a5 refactor sigar_net_ifstat_get_any to prepare for 'bge' interface support 2005-10-09 00:13:25 +00:00
Doug MacEachern 3ff35b960b experiment to use mib2 for nic metrics 2005-10-08 23:45:51 +00:00
Doug MacEachern e124fc5e15 close_mib2 if not already closed 2005-10-08 23:19:18 +00:00
Doug MacEachern ec2e326207 dont step out-of-bounds in hwaddr_lookup 2005-10-08 02:05:41 +00:00
Doug MacEachern cacd0b97c1 actually, arg > 1024 is reasonable in the case of java apps w/ hugeass -classpath 2005-10-08 00:27:07 +00:00
Doug MacEachern cd8cab425e proc_args fix: seems not all processes have the terminating \0 2005-10-07 23:25:36 +00:00
Doug MacEachern 15663ef35c proper fallthrough to net_ifstat_get_any 2005-10-07 20:14:30 +00:00
Doug MacEachern bbd57876df plug leak if get_fsdev_paths fails 2005-10-07 18:40:10 +00:00
Doug MacEachern ea6b08a70f prevent out-of-bounds read/write if proc arg happens to be > 1024 2005-10-07 18:20:44 +00:00
Doug MacEachern af16d018ec plug leak if there happens to be an error reading an arg 2005-10-07 17:19:23 +00:00
Doug MacEachern 4fe3373aa7 FreeLibrary for advapi32.dll 2005-10-03 21:01:51 +00:00
Doug MacEachern 5f8fece190 log fixups 2005-10-03 16:26:56 +00:00
Doug MacEachern 3974333f06 dlload ConvertStringSidToSid, does not exist on NT 2005-10-02 21:13:26 +00:00
Doug MacEachern 90c453d4ac return NULL if no module handle in sigar_GetProcAddress 2005-10-02 20:37:52 +00:00
Doug MacEachern 7007a4740c s/sigar_log_printf/sigar_log/ 2005-10-02 06:03:36 +00:00
Doug MacEachern 8cd8f0f8bd who_list fixes/cleanup 2005-10-02 05:52:33 +00:00
Doug MacEachern b22f20c335 hmm, getpwuid_r can return 0 but pw == NULL 2005-10-02 03:07:59 +00:00
Doug MacEachern f2b304ea3c make it easier to redefine /proc for testing/debugging 2005-09-30 23:05:14 +00:00
Doug MacEachern bc26bd5029 add sanity checking/debug logs to WTS api usage 2005-09-27 19:10:46 +00:00
Doug MacEachern f64b36c0bd use terminal services api to query for RDP logins, adding to who_list 2005-09-27 01:18:54 +00:00
Doug MacEachern 1212c2f03e move win32 specific who_list stuff to win32_sigar.c 2005-09-26 23:35:57 +00:00
Doug MacEachern c99f594008 fix sigar_who_net_sessions 2005-09-26 18:27:48 +00:00
Doug MacEachern 5ba12f568d fix who_list on aix, struct utmp is not binary compatible 2005-09-24 22:37:21 +00:00
Doug MacEachern 24296593f7 net_route_list is not implented 2005-09-24 21:36:16 +00:00
Doug MacEachern 9b749dff51 net_route_list works on darwin 2005-09-24 15:16:08 +00:00
Doug MacEachern 2ad7586b2b remove uneeded include that breaks freebsd 2005-09-24 15:02:10 +00:00
Doug MacEachern 9fc15b09d8 net_connection_list works on darwin with the proper includes 2005-09-24 15:00:01 +00:00
Doug MacEachern 02df1b1697 punt any 64bit native process in proc_args 2005-09-13 16:30:33 +00:00
Doug MacEachern b2830cafbc fix crash in proc_args if psinfo_t.pr_argc == 0 2005-09-12 23:52:02 +00:00
Doug MacEachern 9ec93a73ed plugin possible (but very unlikely) leak in proc_args if argc > 56 and pread error 2005-09-12 20:55:52 +00:00
Doug MacEachern 77e652803d remove unused var 2005-09-12 20:54:09 +00:00
Doug MacEachern 86ce6117de some nic metrics 2005-09-11 06:08:44 +00:00
Doug MacEachern e746628e58 uptime impl 2005-09-10 06:33:09 +00:00
Doug MacEachern bd85a2b104 clib linkage 2005-09-10 05:58:10 +00:00
Doug MacEachern 935ac34dc1 swap_get impl 2005-09-04 04:38:21 +00:00
Doug MacEachern 3d90866f35 file_system_usage impl 2005-09-04 02:59:23 +00:00
Doug MacEachern 43f94a7926 file_system_list impl 2005-09-04 02:38:39 +00:00
Doug MacEachern a556c5e839 get mac address for netware 2005-09-04 01:32:42 +00:00
Doug MacEachern ff4d75d357 fillin some cpu info 2005-09-04 01:06:31 +00:00
Doug MacEachern 1cf65abe89 refactor so netif list/config codes can be used on netware too 2005-09-03 01:34:20 +00:00
Doug MacEachern 53b79a9f76 initialize winsock 2005-09-02 23:49:42 +00:00
Doug MacEachern 1962f0fe68 fix mem.free 2005-09-01 22:42:37 +00:00
Doug MacEachern f3e6cefc4d fillin mem_get 2005-08-28 08:03:21 +00:00
Doug MacEachern 716c3c5856 build sigar.nlm 2005-08-28 07:28:31 +00:00
Doug MacEachern 03d16b015b linker def file 2005-08-28 07:12:24 +00:00
Doug MacEachern 9c7214eb75 netware stubs 2005-08-28 06:55:51 +00:00
Doug MacEachern 249015c01f need getpass function for netware, else unresolved symbol 2005-08-28 06:18:35 +00:00
Doug MacEachern f38169afa4 more netware linkage fixes 2005-08-28 05:59:53 +00:00
Doug MacEachern f243357717 add stubs for netware required to link 2005-08-28 05:47:48 +00:00
Doug MacEachern e44f7a857f compile on NETWARE 2005-08-18 04:22:53 +00:00
Doug MacEachern 7345b920ae more fileattr stuff 2005-08-07 05:38:23 +00:00
Doug MacEachern 3110870743 add some missing attributes for win32 2005-08-07 04:19:15 +00:00
Doug MacEachern 707cb02db1 pid_t is int on cygwin 2005-07-24 06:03:07 +00:00
Doug MacEachern c5f3a8026a refactor so utmp reader can be used on windows 2005-07-24 06:00:13 +00:00
Doug MacEachern c545be8c5d use SESSIONNAME for win32 who.device 2005-07-24 05:34:21 +00:00
Doug MacEachern e04943ccb1 use CLIENTNAME for who.host 2005-07-24 05:20:39 +00:00
Doug MacEachern d229d838b1 fix network share who 2005-07-24 05:02:36 +00:00
Doug MacEachern db81786c26 add local logins to who_list on win32 2005-07-24 05:00:24 +00:00
Doug MacEachern ad1c00ef75 who_list impl for win32 2005-07-24 01:34:27 +00:00
Doug MacEachern 4eca5b0aa0 add pipe_size to resource_limit 2005-07-22 02:26:48 +00:00
Doug MacEachern 56aa4553f5 remove resource_limit.ulimited, switch to ResourceLimit.INFINITY 2005-07-21 23:34:36 +00:00
Doug MacEachern 76260ce6f3 RLIMIT_NPROC impl for non-linux 2005-07-21 22:46:57 +00:00
Doug MacEachern 2e5bc87f49 default unsupported to unlimited 2005-07-21 22:28:07 +00:00
Doug MacEachern 0523277687 scale resource limits same as the ulimit command 2005-07-21 22:19:03 +00:00
Doug MacEachern 3ff4089db1 remove dhcp_server from net_info 2005-07-17 17:46:07 +00:00
Doug MacEachern ac2c89b0a9 disable bell by default 2005-07-17 05:04:34 +00:00
Doug MacEachern 43da1c4ac4 add net_route.metric 2005-07-15 04:13:45 +00:00
Doug MacEachern ddca24c78e use same filter as netstat -r in net_route_list 2005-07-15 03:55:56 +00:00
Doug MacEachern d36d72b16c more net_route stuff 2005-07-15 03:19:11 +00:00
Doug MacEachern 962c8cfd1b set net_info.default_gateway 2005-07-14 01:01:32 +00:00
Doug MacEachern cc4f93cf8f plug possible fd leak if pgrab fails for proc_modules 2005-07-13 15:58:07 +00:00
Doug MacEachern 5b5f4bf48f start net_route_list impl 2005-07-13 04:08:36 +00:00
Doug MacEachern 9c20564afa set some route flags 2005-07-12 18:45:28 +00:00
Doug MacEachern fbd117ae64 set route flags 2005-07-12 18:34:53 +00:00
Doug MacEachern 77a51da4b6 fix net_info 2005-07-11 23:54:39 +00:00
Doug MacEachern 6b238421e7 net_info dhcp_server and default_gateway for windows 2005-07-11 23:24:00 +00:00
Doug MacEachern b3ca673da2 unix net_info.host_name 2005-07-11 22:45:50 +00:00
Doug MacEachern 0a67c7fac2 fillin net_info.host_name 2005-07-11 22:44:13 +00:00
Doug MacEachern 62188b3ee0 start net_info impl for windows 2005-07-11 22:40:31 +00:00
Doug MacEachern 9e98a05fc7 rename net_info.domain to domain_name 2005-07-11 20:41:57 +00:00
Doug MacEachern b000f97bd3 sanity check getdomainname 2005-07-11 20:37:47 +00:00
Doug MacEachern b7c19ce5d3 add net_info.domain for unix 2005-07-11 20:29:38 +00:00
Doug MacEachern 6077527e24 start unix net_info impl 2005-07-11 20:21:13 +00:00
Doug MacEachern df369c99e6 no RLIMIT_NPROC on solaris 2005-07-08 01:51:00 +00:00
Doug MacEachern d45e112ba4 some windows rlimits 2005-07-08 01:49:18 +00:00
Doug MacEachern 82d6a0a1c5 rename some rlimits 2005-07-08 01:11:03 +00:00
Doug MacEachern 9cfd042c6d resource_limit unix impl 2005-07-08 01:03:42 +00:00
Doug MacEachern d84714cf8c convert win32 file times to millis 2005-07-07 17:18:30 +00:00
Doug MacEachern f9291a4e85 proc_mem fixes 2005-06-16 22:21:24 +00:00
Doug MacEachern d182f89671 process memory metrics for darwin 2005-06-16 21:24:49 +00:00
Doug MacEachern b8acea2adb implement proc_args for darwin 2005-05-25 20:05:46 +00:00
Doug MacEachern 713e955063 fix ifstat->rx_frame 2005-05-14 00:02:33 +00:00
Doug MacEachern 33d320fcb2 use psapi instead of CreateToolSnapshot. it is possible for the latter to hang
on windows 2000 and the former also works on NT
2005-05-13 20:56:17 +00:00
Doug MacEachern 13466030b7 missing FreeLibrary call 2005-05-13 20:13:51 +00:00
Doug MacEachern 48097a4bb4 close the snapshot handle 2005-05-13 20:05:37 +00:00
Doug MacEachern 09b258d9fb use sigar_inet_ntoa 2005-05-13 15:16:49 +00:00
Doug MacEachern ad50c42292 set queue metrics 2005-05-13 03:28:21 +00:00