1849825 Members
3908 Online
104044 Solutions
New Discussion

strange ps -ef

 
Vijaya Kumar_3
Respected Contributor

strange ps -ef

Hi i am getting strange ps -ef behavior sinve my /var is full. I cleared /var and now is ok.
but still ps shows like this (no user name)
$ ps -f
UID PID PPID C STIME TTY TIME COMMAND
5029 29396 29395 1 16:19:29 pts/tj 0:00 -ksh
5029 29520 29396 4 16:22:37 pts/tj 0:00 ps -f
0 29395 879 0 16:19:29 pts/tj 0:00 telnetd
$

someone show me some light
TIA
vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
8 REPLIES 8
Vijaya Kumar_3
Respected Contributor

Re: strange ps -ef

i know ps uses /var/adm/ps-data..for logging

but now it is fine

what else then?

Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Michael Steele_2
Honored Contributor

Re: strange ps -ef

Please verify your O/S and paste in the verify.log errors.

# check_patches
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: strange ps -ef

The user ID is 5029 which is correct. The reason that ps doesn't show the user name is likely due to someone deleting the user from the password file. Try this:

grep 5029 /etc/passwd

If nothing comes back, then the user was deleted. NOTE: it is quite possible to have processes running for a user that does not exist in /etc/passwd. After all, all the files owned by this user still have the UID (try ls -l on the user's HOME directory) stored in the inode. It's just the decoding of UID into a friendly username that is failing.


Bill Hassell, sysadmin
Vijaya Kumar_3
Respected Contributor

Re: strange ps -ef

thanks bill and michael for ur time.

i tried both options already. but no success. I am doubting /var/adm/ps-data file. On that day, /var was full and 0 blocks.
We solved the issue by rebooting(obviously, standard solution!). but i wonder why this happens. what is the reason behind this? whu user name is not showing up after /var is freed up?

any experts?

TIA
Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Jakes Louw
Trusted Contributor

Re: strange ps -ef

I've only seen this on a trusted system where the UID cannot resolve to a username because the filesystem is full, but this is usually /, not /var.
Trying is the first step to failure - Homer Simpson
Jean-Louis Phelix
Honored Contributor

Re: strange ps -ef

Hi,

I played with my ps_data file and I corrupted it manually. After that I got some strange results like :

/var/adm> ps -ef
ps: not enough memory for tables

I removed it and ps worked correctly after recreation ... Your full /var perhaps also corrupted yours.

Best regards.
It works for me (© Bill McNAMARA ...)
Vijaya Kumar_3
Respected Contributor

Re: strange ps -ef

Thanks jakes and Jean-louis

Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Rory R Hammond
Trusted Contributor

Re: strange ps -ef

I think your /var/adm/ps_data file was corrupted because of the space problem.

I kind of duplicated this on my test box by
doing the following:

1. mv ps_data ps_data.rl
2. head ps_data.rl > ps_data

3. ps -fe
ps: not enough memory for tables

4. rm ps_data
5 ps -fe #every thing works.
6. diff ps_data ps_data.rl #no difference

I think you might have been able to fix the problem by deleting ps_data and running ps
It recreated an exact duplicate of the old ps_data

Rory

There are a 100 ways to do things and 97 of them are right