[ 
https://issues.apache.org/jira/browse/UIMA-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerry Cwiklik updated UIMA-4826:
--------------------------------
    Description: 
When collecting user processes the Agent spawns ps command and gathers results. 
Under some circumstance the OS ps command may not provide correct results. 
Sometimes it returns user id instead of user name.
User id is a numeric value. Add a check to see if the ps returned a numeric 
value and if so convert it to username by running

getent passwd <uid> | cut -d ':' -f 1



  was:
When collecting user processes the Agent spawns ps command and gathers results. 
Under some circumstance the OS ps command may not provide correct results for 
user id. Sometimes it returns user id instead of user name. 
Modify the ps command to use 
pb = new ProcessBuilder("ps","-Ao","user:12,pid,ppid,uid,user:12,args", 
"--no-heading");
upon return check result of parse and compare user[0] to user[4]. Both should 
match. If different dont collect user data and do another ps command. 
As an extra check, make sure the user is not uid. If is all numeric, throw away 
results and try again.


> UIMA-DUCC: Agent should verify results from ps cmd when detecting rogue 
> processes
> ---------------------------------------------------------------------------------
>
>                 Key: UIMA-4826
>                 URL: https://issues.apache.org/jira/browse/UIMA-4826
>             Project: UIMA
>          Issue Type: Bug
>          Components: DUCC
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>             Fix For: 2.1.0-Ducc
>
>
> When collecting user processes the Agent spawns ps command and gathers 
> results. Under some circumstance the OS ps command may not provide correct 
> results. Sometimes it returns user id instead of user name.
> User id is a numeric value. Add a check to see if the ps returned a numeric 
> value and if so convert it to username by running
> getent passwd <uid> | cut -d ':' -f 1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to