General
cancel
Showing results for 
Search instead for 
Did you mean: 

ps command not found after reboot

Siddharth_6
Occasional Advisor

ps command not found after reboot

Hi gurus,

After restarting the HPUX 11(HP visualize c240) i get ps command not found,

How to come up??

Thanks in advance

Sids
13 REPLIES
Mobeen_1
Esteemed Contributor

Re: ps command not found after reboot

Sids,
Have you checked if this command is found at bin and sbin directories

$ls -l /usr/bin/ps
$ls -l /usr/sbin/ps

If you can see the file at either one of the locations, then i suggest that you see if these directories are defined in the PATH

rgds
Mobeen
KapilRaj
Honored Contributor

Re: ps command not found after reboot

Post echo $PATH ...

And try after the following

export PATH=$PATH:/usr/bin:/usr/sbin

If not you can copy it from another node (same version) / recover from backup

Kaps
Nothing is impossible
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

yess, seeems ps is not there..


how to get it back??
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

Hi,

Thanks All,

But i have a single HP machine??

COuld any body please send me the "ps" command binary.


Thanks

Sids
Duncan Edmonstone
Honored Contributor

Re: ps command not found after reboot

Sids

Are you sure your /usr directory is mounted?

whats the output of

mount -p

HTH

Duncan


HTH

Duncan
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

Thanks,

Here is the out put of mount -p

/dev/vg00/lvol3 / vxfs log 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 0
/dev/vg00/lvol8 /var vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol7 /usr vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol6 /tmp vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol5 /opt vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol4 /home vxfs delaylog,nodatainlog 0 0


I know every thing is fine except i lost the ps ?? i dun know how to get it back?

Thanks

Sids



Pete Randall
Outstanding Contributor

Re: ps command not found after reboot

Sids,

As Duncan pointed out, you /usr seems to be missing. Check the output of dmesg for errors concerning /usr at boot-up time. We'll need to find the reason it didn't get mounted and fix it so we can mount it.


Pete

Pete
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

hi pete,

even m not able to find out the ps in /usr/bin as well as in /usr/sbin. and its mounted ..

Thanks

Sids
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

could any body plz send me the "ps" command exe for HPUX 11.

Thanks

Sids
Pete Randall
Outstanding Contributor

Re: ps command not found after reboot

Sorry, Sids, my old eyes must be playing tricks on me - I could have sworn it wasn't there, but I see it now.

Attaching /usr/bin/ps command.


Pete


Pete
Siddharth_6
Occasional Advisor

Re: ps command not found after reboot

Hi,

Thanks to all, Pete the binary sent by you didn work for me. I finally installed HPUX in a new scuzzy and come up with the crazzy thing. but still m surprised where the binary has gone??

Sids
KapilRaj
Honored Contributor

Re: ps command not found after reboot

I think I have an idea if u have a Tape or a Floppy Drive, Looks logical but never tried.

1. Boot the node through the Install CD ==>>Open Recovery Shell ==>

loadfil /usr/bin/ps
loadfil /usr/sbin/insf
loadfil /usr/sbin/tar
loadfil /usr/sbin/ioscan
insf -e
ioscan -fnCtape
tar cvf /dev/rmt/0mn /usr/sbin/ps

Boot the system normally and restore this tape !

Regds,

Kaps
Nothing is impossible
Elmar P. Kolkman
Honored Contributor

Re: ps command not found after reboot

Sids, there are multiple problems with copying ps this way. But first finding out where ps has gone.

(Next time) take a look in /usr/lost+found for files there. If fsck has found problems on your filesystem and doesn't know where a file belongs, it is put there. So you should check lost+found directories after each reboot to make sure your filesystems are still intact when you miss files.

Next: could it be your reboot was due to a patch installation? Perhaps a patch on ps? In that case, removing that patch would solve the issue.

And that leads to a problem with putting a 'random' ps version on your system. There are patches for commands like ps, so if you want to be sure you install the right ps, you should first check what patches are installed and then copy the command from a environment on the same patch level.

Perhaps creating a recovery tape on regular basis can help too. If you loose something from your vg00, you can recover it from there, or reinstall your system exactly the way it was.

Good luck, and I hope this info is still of some use.
Every problem has at least one solution. Only some solutions are harder to find.