- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rogue .sh processes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 10:17 PM
тАО03-19-2007 10:17 PM
i am seeing a couple of .sh processes hogging up cpu (using top) - how do i find out whats these are for ?
note, this is not normal behaviour for this node
tia
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 10:21 PM
тАО03-19-2007 10:21 PM
Re: rogue .sh processes
$ UNIX95= ps -xHfp PID ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 10:52 PM
тАО03-19-2007 10:52 PM
Re: rogue .sh processes
Someone or something(cron, an application) is launching processes.
The top output or ps -ef | grep ... should provide you enough information to look at the script and see where it sits and what its trying to do.
This is one of those investigative questions, you have to look at the source and try and figure out who, and why this is happening.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 10:54 PM
тАО03-19-2007 10:54 PM
Re: rogue .sh processes
0 pts/1 5838 user 237 20 2012K 172K run 9306:38 49.93 49.85 sh
0 pts/0 20200 user 237 20 2012K 160K run 13193:11 46.83 46.75 sh
ps shows this ;
$ps -xfp PID 5838
ps: wrong PID number PID
UID PID PPID C STIME TTY TIME COMMAND
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 10:56 PM
тАО03-19-2007 10:56 PM
Re: rogue .sh processes
ps -ef | grep just comes back with what top shows
is there a way to interigate the PID to see exactly (if anything) whats running it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 11:28 PM
тАО03-19-2007 11:28 PM
Re: rogue .sh processes
here is some more info ;
$/usr/local/bin/lsof|grep 5838
sh 5838 user txt REG 64,0x8 204800 10161 /usr/bin/rsh
sh 5838 user mem REG 64,0x8 24576 4972 /usr/lib/libdld.2
sh 5838 user mem REG 64,0x8 1822720 5203 /usr/lib/libc.2
sh 5838 user mem REG 64,0x8 155648 118 /usr/lib/dld.sl
sh 5838 user 0u STR 157,0x1 0t5816 939 /dev/pts/1->ldterm->ptem->pts
sh 5838 user 1u STR 157,0x1 0t5816 939 /dev/pts/1->ldterm->ptem->pts
sh 5838 user 2u STR 157,0x1 0t5816 939 /dev/pts/1->ldterm->ptem->pts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 11:41 PM
тАО03-19-2007 11:41 PM
Re: rogue .sh processes
(sh) processes. Is there a child?
>is there a way to interrogate the PID to see exactly (if anything) whats running it
Dump all of "user"'s processes:
$ UNIX95= ps -xHfu user
If you're root, you can attach gdb and get a stack trace. Or use tusc and see what it is doing.
>$ps -xfp PID 5838
The idea was to replace PID by 5838. Followed by -p PID2 -p PID3 ...
And you need that UNIX95= before the ps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 11:56 PM
тАО03-19-2007 11:56 PM
Re: rogue .sh processes
but neither of the commands give me much more than what i already have - PID PPID
whats the signifisance of the 255 ?
$UNIX95= ps -xHfp 5838
UID PID PPID C STIME TTY TIME CMD
user 5838 1 255 Mar 6 pts/1 6-11:33:14 -sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2007 01:21 AM
тАО03-20-2007 01:21 AM
SolutionDo you have any terminals anywhere?
What if you do a 'last -R user', where 'user' is the user that is logged in? If it were a remote login then it would show the host/IP of the source of the login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2007 11:55 AM
тАО03-20-2007 11:55 AM
Re: rogue .sh processes
If you used the -xHfu user, you would see the whole process tree. But since the PPID is 1, that wouldn't help much. It would help to see if that sh process had a child:
$ UNIX95= ps -xHfu user | fgrep 5838
>whats the significance of the 255?
cpu Processor utilization for scheduling. The default heading for this column is C.
This says you have the lowest (worst) priority since you are in a loop.
$UNIX95= ps -xHfp 5838
UID PID PPID C STIME TTY TIME CMD
user 5838 1 255 Mar 6 pts/1 6-11:33:14 -sh
This says your parent (remshd?) has died. You should just kill the process because it isn't acting correctly when it got a SIGHUP?? I've seen this happen for some scripts when it gets disconnected.
>Patrick: Your lsof shows that these appear to be restricted shell (/usr/bin/rsh)
These are not rsh, just sh. I think lsof just stops when it finds any file with the right inode. Both rsh and sh are hardlinks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2007 01:41 AM
тАО03-22-2007 01:41 AM
Re: rogue .sh processes
i resolved the issue by killing the processes
thanks