All Questions

Tagged with
0
votes
2answers
2k views

Problem using tail and awk to monitor log and execute a command

I want to monitor a log file in real time, and execute some commands when some sentences appear in the log. I searched this site (and many other sites) and these are what I tried: tail -f /var/log/...
2
votes
1answer
65 views

Use head command or similar to determine when bytes change in a file

If we use the tail command we can listen for events representing changes to the files length (in bytes). I am looking for a way to listen for events when the content of the file changes but the ...
16
votes
1answer
776 views

How to get an average pipe flow speed

If myfile is increasing over time, I can get the number of line per second using tail -f | pv -lr > /dev/null It gives instantaneous speed, not average. How can I get the average speed (i.e the ...
0
votes
1answer
188 views

monitor simple process output

On my system I can check a job's status using qstat: $ qstat 2048930 Job ID Name User Time Use S Queue ------------------------- ---------------- ------------...
5
votes
3answers
817 views

Open a directory and let it update itself using “tail -f”

Similar to my last question: Open a text file and let it update itself; is there a way I could do the same but for a folder instead? As I have a log folder, can I use tail -f with a folder? i.e. $ ...
19
votes
3answers
15k views

Open a text file and let it update itself

How can I open a text file and let it update itself? Similar to the way top works. I want to open a log file and watch it update itself on the fly. I have just tried: $ tail error.log But just ...
104
votes
5answers
280k views

How to monitor only the last n lines of a log file?

I have a growing log file for which I want to display only the last 15 lines. Here is what I know I can do: tail -n 15 -F mylogfile.txt As the log file is filled, tail appends the last lines to the ...
1
vote
3answers
648 views

Is there a way to beep when tail -F stops to fetch new results?

A few days ago I asked Is there a way to make tail -F beep? Now I want to know if there is any way to use *nix utilities, to beep when a tail -F stops returning new lines for a while! I know, I ...
9
votes
3answers
4k views

Is it fine to use tail -f on large log files

I would like monitor a large log file (close to 1 GB) for errors. I want this to be close to real time (few seconds delay is fine). My plan is to use tail -f | grep. Is there any performance issues ...
58
votes
3answers
98k views

How does the “tail” command's “-f” parameter work?

$ tail -f testfile the command is supposed to show the latest entries in the specified file, in real-time right? But that's not happening. Please correct me, if what I intend it to do is wrong... I ...
9
votes
2answers
2k views

Is it possible to follow a command (run repeatedly)? as one would follow a file using tail -f?

I have a script which produces a file 'Detail.out'. I know that the script is completed whenever the file contains a certain number of lines (roughly 21025). So I find myself sitting at the command ...