State metric not matching
search cancel

State metric not matching

book

Article ID: 277282

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

Process State data from Linux Host not matching.

From agent metric it is showing the value of 5, zombie state:

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/application-performance-management/21-3/deploy-and-configure-dx-apm-agents/infrastructure-agent/host-monitoring/Host-Monitoring-on-Linux/host-monitoring-metrics-linux/Process-Metrics---Linux.html

System metric:

Why the agent is showing a value different of the operation system?

Environment

Linux Red Hat/Release 2023.8.1.6 ( 990006 )

Resolution

The process "State" metric from the latest DX APMIA host monitoring agent extension is working as expected.  Please verify the process state by checking the 3rd field in the command output from running either top command or "cat /proc/<pid>/stat".

The current implementation has the OID reference values to the process state mapped as below:

case OS_PROCESS_STINT: /* 4.1 */  
  long_return = 9; /* other */
   
  if (strstr(proc_cache[index].state,"zombie"))
  long_return = 10;
  if (strstr(proc_cache[index].state,"stop"))
  long_return = 8;
  if (strstr(proc_cache[index].state,"sleep"))
  long_return = 7;
  if (strstr(proc_cache[index].state,"sleeping")) /* after sleep */
  long_return = 5;
  if (strstr(proc_cache[index].state,"swapped"))
  long_return = 6;
  if (strstr(proc_cache[index].state,"wait"))
  long_return = 4;
  if (strstr(proc_cache[index].state,"active"))
  long_return = 3;
  if (strstr(proc_cache[index].state,"runnable"))
  long_return = 2;
  if (strstr(proc_cache[index].state,"starting"))
  long_return = 1;




 
return (u_char *)&long_return;

The OID (1.3.6.1.4.1.546.1.1.4.1.28) defined as processStateInt OBJECT-TYPE SYNTAX INTEGER { procStateStarting(1), procStateRunnable(2), procStateActive(3), procStateWait(4), procStateSleeping(5), procStateSwapped(6), procStateSleep(7), procStateStop(8), procStateOther(9), procStateZombie(10) } ACCESS read-only STATUS mandatory DESCRIPTION "The process state, as above, represented by integer for easier polling and trending." ::= { processEntry 28 }
 

https://oidref.com/1.3.6.1.4.1.546.1.1.4.1.28
 

Thus, the process state value 5 is "sleeping", not "zombie" (10). 

We have raised an internal ticket in order to fix our documentation.