The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
determine owner of a file unibboy Shell Programming and Scripting 4 01-26-2008 11:39 AM
Shell script for accessing a file in the network drive and invoking oracle sql loader sayydevara Shell Programming and Scripting 0 03-20-2007 12:54 PM
How to determine the max file size dknight UNIX for Advanced & Expert Users 2 10-27-2006 05:39 AM
determine the size of a file??? alan UNIX for Dummies Questions & Answers 8 12-31-2003 11:23 AM
How to determine if a File is Open? derrikw2 UNIX for Advanced & Expert Users 2 02-01-2002 08:30 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-22-2006
Registered User
 

Join Date: May 2006
Posts: 5
Determine which file is invoking process?

Hey Guys,

I am trying to figure out what is chewing up a bunch of CPU on our SunFire V120 Boxes and I am having a little trouble drilling down the source.

When I check the CPU usage it displays tail & cat as the top two processes
Code:
PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP        
22110 root     1440K 1032K sleep   32    0   0:00.08  24% tail/1 
22111 root     1224K  744K run     21    0   0:00.05  17% cat/1
To get an idea of what arguments were being sent to cat I did a ps -ef | grep cat, which shows this.
Code:
/usr/bin/cat -s /var/adm/messages.9 /var/adm/messages.8 /var/adm/messages.7
Now these message files are massive, approx 150-200MB in size and we roll them up daily into messages.1 messages.2 etc etc up until .24

I am trying to determine which script and or file is initiating this cat against the message files, as it needs to be adjusted to simply look at messages and not the messages.x archived files.

I thought I could determine this by running lsof against the PID's, but I can't tell from these results if a script or a cron job somewhere is initiating the command.

Code:
lsof -p 22110
COMMAND   PID USER   FD   TYPE        DEVICE  SIZE/OFF    NODE NAME
tail    22110 root  cwd   VDIR           0,2       722 3988152 /tmp
tail    22110 root  txt   VREG          32,0     10064  202941 /usr/bin/tail
tail    22110 root  txt   VREG          32,0   1158072   56610 /usr/lib/libc.so.1
tail    22110 root  txt   VREG          32,0     17096  230926 /usr/platform/sun4u/lib/libc_psr.so.1
tail    22110 root  txt   VREG          32,0      4952   56475 /usr/lib/libdl.so.1
tail    22110 root  txt   VREG          32,0    255948   56528 /usr/lib/ld.so.1
tail    22110 root    0u  FIFO 0x30003cf9220     0t512 6871388 (fifofs) PIPE->0x30003cf9308
tail    22110 root    1w  VREG          32,4        30 1982519 /var/opt/OV/tmp/OpC/dmesg.out
tail    22110 root    2u  VCHR          13,2       0t0  321080 /devices/pseudo/mm@0:null
tail    22110 root    6r  VREG          32,4 118769520  788499 /var/adm/messages
tail    22110 root    7r  VREG          32,4         0  788488 /var/adm/loginlog

lsof -p 22111
cat     22111 root  cwd   VDIR           0,2       722 3988152 /tmp
cat     22111 root  txt   VREG          32,0     10092  202786 /usr/bin/cat
cat     22111 root  txt   VREG          32,4 257483912  788494 /var/adm/messages.6
cat     22111 root  txt   VREG          32,0   1158072   56610 /usr/lib/libc.so.1
cat     22111 root  txt   VREG          32,0     17096  230926 /usr/platform/sun4u/lib/libc_psr.so.1
cat     22111 root  txt   VREG          32,0      4952   56475 /usr/lib/libdl.so.1
cat     22111 root  txt   VREG          32,0    255948   56528 /usr/lib/ld.so.1
cat     22111 root    0u  VCHR          13,2       0t0  321080 /devices/pseudo/mm@0:null
cat     22111 root    1u  FIFO 0x30003cf9308  0t262144 6871388 (fifofs) PIPE->0x30003cf9220
cat     22111 root    2u  VCHR          13,2       0t0  321080 /devices/pseudo/mm@0:null
cat     22111 root    3r  VREG          32,4 158160019  788496 /var/adm/messages.5
cat     22111 root    6r  VREG          32,4 118658470  788499 /var/adm/messages
cat     22111 root    7r  VREG          32,4         0  788488 /var/adm/loginlog
What makes this harder is that I am coming into this brand new and I don't know the history of this box, so I'm not even sure why the message files are being processed, but I think it has to do with alarming.

Can anyone suggest a way or interpret the results to find out what is invoking this cat/tail command?

Thanks
Jerrad
Reply With Quote
Forum Sponsor
  #2  
Old 06-22-2006
Registered User
 

Join Date: May 2006
Posts: 5
NM, I found the problem.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0