[ZBX-11015] Zabbix Agent can't get proc.* item data on Solaris 10 Created: 2016 Jul 21 Updated: 2017 May 30 Resolved: 2016 Aug 04 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 3.0.3 |
Fix Version/s: | 3.0.5rc1, 3.2.0alpha1 |
Type: | Incident report | Priority: | Major |
Reporter: | David Angelovich | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | permissions, proc.cpu.util, solaris | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Solaris 10 u11 |
Description |
In an out-of-the-box install of Solaris, Zabbix Agent won't retrieve correct data for proc.mem, proc.cpu.util or proc.num - unless the process is running under the same user as the Agent. Running the agent as root seems to work around the issue, but isn't recommended. Returned value is 0 1678:20160721:095728.946 Requested [proc.cpu.util[,root]] 1678:20160721:095728.946 In procstat_add() 1678:20160721:095728.946 In zbx_dshm_realloc() shmid:-1 size:21704 1678:20160721:095728.946 In procstat_copy_data() 1678:20160721:095728.946 End of procstat_copy_data() 1678:20160721:095728.947 End of zbx_dshm_realloc():SUCCEED shmid:47 1678:20160721:095728.947 End of procstat_add() 1681:20160721:095729.886 In send_buffer() host:'dangelovich-ud2.dev.blah.com' port:10051 entries:0/100 1681:20160721:095729.886 End of send_buffer():SUCCEED 1681:20160721:095729.886 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]' 1677:20160721:095729.899 __zbx_zbx_setproctitle() title:'collector [processing data]' 1677:20160721:095729.899 In update_cpustats() 1677:20160721:095729.899 End of update_cpustats() 1677:20160721:095729.902 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]' 1681:20160721:095730.886 In send_buffer() host:'dangelovich-ud2.dev.blah.com' port:10051 entries:0/100 1681:20160721:095730.886 End of send_buffer():SUCCEED 1681:20160721:095730.886 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]' 1677:20160721:095730.902 __zbx_zbx_setproctitle() title:'collector [processing data]' 1677:20160721:095730.902 In update_cpustats() 1677:20160721:095730.902 End of update_cpustats() 1677:20160721:095730.903 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]' 1678:20160721:095730.948 Sending back [0.000000] |
Comments |
Comment by Aleksandrs Saveljevs [ 2016 Jul 25 ] |
Seems to work well for me: $ sbin/zabbix_agentd -t proc.num[sshd] proc.num[sshd] [u|5] $ sbin/zabbix_agentd -t proc.num[sshd,root] proc.num[sshd,root] [u|3] $ sbin/zabbix_agentd -t proc.num[sshd,zabbix] proc.num[sshd,zabbix] [u|2] Could you please check that this is not a permission issue? |
Comment by David Angelovich [ 2016 Jul 25 ] |
My mistake - it appears to be proc.cpu.util only that is returning 0.0 for every check. |
Comment by Aleksandrs Saveljevs [ 2016 Jul 26 ] |
Hm, seems to be the case indeed. Setting to "Confirmed". |
Comment by Sandis Neilands (Inactive) [ 2016 Jul 29 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-11015 r61263. Tested on virtual instance (4-cores) of Solaris 11. |
Comment by Sandis Neilands (Inactive) [ 2016 Jul 29 ] |
For convenience, comment from the fixed function. * Comments: we use /proc/[pid]/usage since /proc/[pid]/status contains * * sensitive information and by default can only be read by the * * owner or privileged user. * * * * In addition to user and system-call CPU time the * * /proc/[pid]/usage also contains CPU time spent in trap context * * Currently trap CPU time is not taken into account. * * * * prstat(1) skips processes 0 (sched), 2 (pageout) and 3 (fsflush) * * however we take them into account. * |
Comment by Andris Zeila [ 2016 Aug 03 ] |
Successfully tested, please review minor style fix in r61373. sandis.neilands CLOSED. |
Comment by Sandis Neilands (Inactive) [ 2016 Aug 03 ] |
Fixed in:
|