Check Command Output

Discussion created by mroberts on Jul 19, 2013
Latest reply on Jul 22, 2013 by ntimm

Hi all,


I have a Linux server and I am trying to make sure a certain service has not frozen by running a command against it. My thought is that if the command times out then I will know the service has locked up (I am using this to track an issue, it is intermittent and I am trying to determine how long this process stays frozen). Right now I am using the nexec probe to run:


/bin/sh -c with the argument "zpool status"


It returns the data if I do this manually and can schedule it to run every minute, but I am not sure how to or if it is possible to store QoS for how long the command takes to execute and throw an error if it fails.


Would this be possible or should I look in a different direction? In the future I may want to parse out the results of the command, but that is not a requirement right now. I also looked at the logmon command feature, but could not get that to return any data. Any help or a point to an example would be greatly appreciated. I did not see this already discussed or this use case discussed in the probe notes. If it is there and I missed it I apologize.


Thank you,