Check for updation/error/stuck of logs


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Check for updation/error/stuck of logs
# 1  
Old 03-07-2013
Check for updation/error/stuck of logs

Hi All,

I'm a newbie in Linux Programming.Smilie
Got some 500 processes running and I have around 20-30 logs updating for every 2mins on a server. The logs which i'm referring usually contains book name,run ids(not PID's),process name etc etc.
I'm interested in finding out whether some particular run id is running/stuck/failed with error.

Code:
apps/trep/basicactions/logs/:~$ps -ef | grep 530654 .log*

Above is the code im using..but returns nothing even when i know that 530654 is run id. 530654 is just an example given.

Please help me out with any of the commands to check for my above query.

Thanks in advance
NKSmilie

---------- Post updated at 08:19 AM ---------- Previous update was at 08:14 AM ----------

will this command help me.?
Code:
grep 530654 | tail -f .log*

# 2  
Old 03-07-2013
So, I'm afraid what you have doesn't make sense really.

You are saying "Get me a list of all processes and pass that into a grep against a file. I'm not sure that will have any effect.

Are your log files all called .log* ? in which case, you just need the second part of the command. If you are trying to say "Which are the open log files, and is my search string in them?" then that's a whole different question.

Assuming that the log name is in the output of ps -ef, can you copy and paste a sample so we know what we're looking at?


Thanks,
Robin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To check if a file is open and in use (logs are being written to it)

Hello Experts, I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this. while true; do echo `date` >>abc.txt; done then I checked lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies

2. Shell Programming and Scripting

Script to check response time from nginx logs

Hi, My goal is to monitor the response time from the access logs of nginx server. I am using gawk to print the needed fields - 'response time' and 'name of the service' from nginx logs. Command: gawk '($6 ~ /cloudservice/) {print $10, $6}' access.log Output: 0.645 /nc/cloudservice... (6 Replies)
Discussion started by: nshah11
6 Replies

3. Shell Programming and Scripting

Any utility or tool to check logs

HI, In our project daily we need to check for some errors in around 45-50 folders. Please let me know if there is any utility tool using which 1 can check each folder and file for error. Use: Monday we are checking if there were any error in files generated on Monday Tuesday to Wednesday we... (7 Replies)
Discussion started by: ankush_mehra
7 Replies

4. Shell Programming and Scripting

Need to check logs

I have nearly 25+ tail commands which we need to verify the logs if there is any errors on current or previous date with time. I need this to be automate and send email to me with details. Please help me on this. (5 Replies)
Discussion started by: Nasir HussainSM
5 Replies

5. Shell Programming and Scripting

Script to check logs

I have 5 log files under different directores . say for eg abc under /home/dir1 , xyz under home/dir2 . is there a script that i can run from say /home that searchers all these files for string or combination of strings and write to a file eg search file by timestamp|keyword o/p in a file (6 Replies)
Discussion started by: Nevergivup
6 Replies

6. Shell Programming and Scripting

check files updation

Hi All, Can anyone help to write the script to check files updation? i have files as mentioned below. which will be updated some time. i just want to check the last file is updating the data for last 15 mins or not. if its not updating i want to print NOT OK. if its updating data i want... (1 Reply)
Discussion started by: steve2216
1 Replies

7. Shell Programming and Scripting

to check files updation in sys time

Dear All, Pls help me on this issue. i want to write a script to check whether files updation happening in cuttent time or not. i have set of files in directory which wil update in time basis.. Requirement: If the files are updating in system time i just want to print "files are... (6 Replies)
Discussion started by: steve2216
6 Replies

8. Solaris

logs to check

Hi all i want to know what are the logs we need to check when the server is down and how to resolve to make server UP? please help me with this (8 Replies)
Discussion started by: vkav
8 Replies

9. Shell Programming and Scripting

How to check whether logs are updating or not?

how to check whether logs are updating or not in unix is there any built in command or function ? (1 Reply)
Discussion started by: mail2sant
1 Replies

10. UNIX for Dummies Questions & Answers

is it possible to check logs in UNIX who deleted the files?

Hello, is it possible to check logs in UNIX who deleted the files? Is there logs in UNIX besides .sh_history? (1 Reply)
Discussion started by: james_falco
1 Replies
Login or Register to Ask a Question