[CentOS] process show uid not user
James Pearson
james-p at moving-picture.com
Tue Jun 19 15:49:32 UTC 2007
James Pearson wrote:
> Frank M. Ramaekers wrote:
>
>> One of my user's processes shows up with the uid (numeric) rather than
>> the user (alpha) on the ps command. The /etc/passwd file shows:
>>
>> theuser:x:500:501:The user:/home/theuser:/bin/bash
>>
>> But, 'ps -ef' shows the uid:
>>
>> 500 9041 8864 0 11:20 pts/1 00:00:00 ps -ef
>>
>> Allother active users show the user. Ideas?
>
>
> The username is probably more than 8 characters
You can work round this by doing something like:
ps -e -o user:15,pid,ppid,c,stime,tname,time,cmd
this will give a similar output to 'ps -ef' - but with more characters
for the username - you might want to play with that number
You can also set the environment variable:
PS_FORMAT=user:15,pid,ppid,c,stime,tname,time,cmd
and then just run 'ps -e'
James Pearson
More information about the CentOS
mailing list