I'm a newbie in Linux Programming.
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.
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
NK
---------- Post updated at 08:19 AM ---------- Previous update was at 08:14 AM ----------
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?
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)
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)
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)
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)
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)
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)
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)
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)