Questions tagged [monitoring]

Obtaining real-time values of system parameters or events (processor load, server responsiveness, intrusion attempts, …), or getting alerted when certain events happen

Filter by
Sorted by
Tagged with
214
votes
16answers
384k views

GPU usage monitoring (CUDA)

I installed CUDA toolkit on my computer and started BOINC project on GPU. In BOINC I can see that it is running on GPU, but is there a tool that can show me more details about that what is running on ...
165
votes
10answers
286k views

How to monitor CPU/memory usage of a single process?

I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
123
votes
10answers
234k views

Script to monitor folder for new files?

How to detect new files in a folder with a bash script? I would like to process the files as soon as they are created in the folder. Is this possible to do so or do I have to schedule a script with ...
109
votes
5answers
288k 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 ...
78
votes
6answers
110k views

On-the-fly monitoring HTTP requests on a network interface?

For debugging purposes I want to monitor the http requests on a network interface. Using a naive tcpdump command line I get too much low-level information and the information I need is not very ...
66
votes
6answers
158k views

List ports a process PID is listening on (preferably using iproute2 tools)?

I'm looking to list all ports a PID is currently listening on. How would you recommend I get this kind of data about a process?
63
votes
5answers
132k views

Can I change root's email address or forward it to an external address?

I'm getting a lot of mail in my root user's mail account. This appears to be mostly reports and errors from things like cron scripts. I'm trying to work though and solve these things, possibly even ...
62
votes
5answers
101k views

How to determine which process is creating a file? [duplicate]

Given file path, how can I determine which process creates it (and/or reads/writes to it)?
61
votes
5answers
55k views

List the files accessed by a program

time is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can list the files being accessed by a program and its children. ...
59
votes
3answers
102k 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 ...
35
votes
3answers
43k views

Determining Specific File Responsible for High I/O

This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, ...
33
votes
8answers
153k views

Health check of web page using curl

I'd like to do a health check of a service by calling a specific url on it. Feels like the simplest solution would be to use cron to do the check every minute or so. In case of errors, cron sends me ...
32
votes
5answers
21k views

Is it possible to find out what program or script created a given file?

Three files have suddenly appeared in my home directory, called "client_state.xml", "lockfile", and "time_stats_log". The last two are empty. I'm wondering how they got there. It's not the first time ...
32
votes
3answers
50k views

Where can I see a list of kernel killed processes?

Is there some way I can check which of my processes the kernel has killed? Sometimes I log onto my server and find that something that should've run all night just stopped 8 hours in and I'm unsure if ...
31
votes
5answers
111k views

How to monitor incoming http requests

How can I monitor incoming HTTP requests to port 80? I have set up web hosting on my local machine using DynDNS and Nginx. I wanted to know how many request are made on my server every day. Currently ...
28
votes
1answer
3k views

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently I thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
26
votes
7answers
16k views

Process Monitor equivalent for Linux?

Is there a Unix/Linux equivalent of Process Monitor, whether GUI or CUI? If it makes a difference, I'm looking at Ubuntu, but if there's an equivalent for other systems (Mac, other Linux variants ...
25
votes
4answers
48k views

Show network connections of a process

There is a way to show the connections of a process? Something like that: show PID in which show is a command to do this, and PID is the pid of the process. The output that I want is composed by all ...
25
votes
4answers
20k views

How to run a command when a directory's contents are updated?

There is a directory A whose contents are changed frequently by other people. I have made a personal directory B where I keep all the files that have ever been in A. Currently, I just occasionally ...
22
votes
4answers
22k views

Monitor hard disk activity [duplicate]

In a Ubuntu 14.04 server I am experiencing a massive hard disk activity which has no apparent justification: it comes as a burst, it lasts a few minutes and then disappears. It consumes system ...
22
votes
9answers
42k views

Ensure a process is always running

I started hosting sites a while back using Cherokee. For external sources (FastCGI, etc) it has an option to launch the process if it can't find one running on the designated socket or port. This is ...
21
votes
3answers
48k views

Getting current TCP connection count on a system

Instead of doing wc -l /proc/net/tcp, is there a faster way of doing it? I just need a total count of tcp connections.
21
votes
5answers
1k views

Which application should I blame for compulsively creating a directory again and again?

There's an application on my system which keeps creating an empty ~/Desktop directory again and again. I can't stand capital letters in my home, nor I can stand this “desktop” thingy. So, as picky as ...
20
votes
3answers
17k 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 ...
20
votes
4answers
40k views

Find out network traffic per IP

We have one central server which functions as an internet gateway. This server is connected to the internet, and using iptables we forward traffic and share the internet connection among all computers ...
20
votes
3answers
39k views

How to use inotifywait to watch a directory for creation of files of a specific extension

I have seen this answer. You should consider using inotifywait, as an example: inotifywait -m /path -e create -e moved_to | while read path action file; do echo "The file '$file' ...
20
votes
3answers
201k views

How can I see what processes are running?

I use Ubuntu Server 10.10 and I would like to see what processes are running. I know that PostgreSQL is running on my machine but I can not see it with the top or ps commands, so I assume that they ...
20
votes
1answer
21k views

What is [jbd2/dm-3-8] and [kdmflush]? And why are they constantly on iotop?

Using Fedora for a small Samba and development server.
19
votes
4answers
68k views

Linux file access monitoring

Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How ...
19
votes
3answers
7k views

Monitor what is being sent to /dev/null?

Just for fun: Is there a way to monitor/capture/dump whatever is being written to /dev/null? On Debian, or FreeBSD, if it matters, any other OS specific solutions are also welcome.
18
votes
6answers
18k views

Is there a tool that allows logging of memory usage?

I want to monitor memory usage of a process, and I want this data to be logged. Does such a tool exist?
17
votes
4answers
90k views

Bash script to detect when my server is down or offline

Background : I need to receive an alert when my server is down. When the server is down, maybe the Sysload collector will not be able to send any alert. To receive an alert when the server is down, I ...
17
votes
8answers
14k views

What are some common tools for intrusion detection? [closed]

Please give a brief description for each tool.
17
votes
5answers
55k views

monitoring file changes + process access to files

I would like to see what's happening in my app server folders, i.e. which files are changed by process x or which *.war files have been changed (replaced/created) in the last x minutes. Is there a ...
17
votes
1answer
3k views

How can I make tmux monitor a window for inactivity?

I've switched from GNU Screen to tmux. They're both similar, except that tmux is still maintained. GNU Screen has a C-a _ ("silence") command. This command makes GNU Screen monitor the current ...
17
votes
2answers
11k views

Alternative to iotop for non-root user without sudo privileges

I'm looking for an alternative to iotop. Here's my situation: I want to find out if a program is accessing the hard drive a lot while running. iotop requires root/sudo privileges. My account is on ...
16
votes
5answers
2k views

Monitoring activity on my computer.

So recently I found that someone has been using my computer without consent, browsing folders, etc.... I could change all my passwords straight away, but I'm curious as the what the intruding party ...
16
votes
1answer
802 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 ...
15
votes
5answers
2k views

How to check which line of a bash script is being executed

Is there a way to check which line number of a bash script is being executed "right now"? Using bash -x script.sh looks promising; however, I need to get the current line number.
15
votes
1answer
10k views

iotop showing 1.5 MB/s of disk write, but all programs have 0.00 B/s

I don't understand iotop output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? The video was taken as I was deleting the content of a folder with a few millions ...
15
votes
3answers
8k views

Is there a tool that can monitor bandwidth usage of a single process?

I've found a nice monitor which allows me to log a variety of runtime data of a single process. I'm looking for an equivalent that does the same for bandwidth usage. Ideally, the command should look ...
14
votes
5answers
7k views

What happens when I open and read from /proc? [duplicate]

Does the hard drive need to be accessed or is everything done in memory? Basically I would like to constantly get updated values from meminfo and cpuinfo. Do I need to reopen the file and then reread ...
14
votes
2answers
12k views

Linux: Writing a watchdog to monitor multiple processes

A few years ago, a coworker came up with an elegant solution for a watchdog program. The program ran on Windows and used Windows Event objects to monitor the process handles (PID’s) of several ...
13
votes
4answers
38k views

What can I use to monitor and log incoming/outgoing traffic to/from remote hosts?

I run a web server (Debian Squeeze on a VPS), and the graphs provided by the hosting company show consistently that around twice as much traffic is incoming to the server compared to the outgoing ...
13
votes
1answer
46k views

iostat: await vs. svctm

In the iostat manpage I have found these two similar columns: await The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by ...
12
votes
4answers
16k views

USB performance/traffic monitor?

First of all, I found a similar question but it doesn't really solve my problem. I am trying to discover if the USB bus for a device I am using is the bottleneck in my program. How can I monitor a ...
12
votes
3answers
1k views

Maintain 100 instances of a program running

I'm currently using supervisord to maintain 100 instances of a script running at once. If any die then it starts up a new one. However it seems to be struggling maintaining larger numbers (>300 ...
11
votes
2answers
12k views

Is there a way to get “top” to run exactly once and exit?

I find the output of the shell command top to be a simple and familiar way to get a rough idea of the health of a machine. I'd like to serve top's output (or something very similar to it) from a tiny ...
11
votes
4answers
12k views

Possible to get SMS/text message notification when process ends or is killed?

There are scripts that will send an e-mail when a server process is finished. However, I do not want to check my email every so often just to see whether a job has finished. Therefore I'd like to get ...
11
votes
2answers
2k views

Overheating results in system shutdown

I have been having an overheating issue which makes my laptop shutdown immediately. Is there anyway to monitor the temperature from the sensor and scale down the CPU frequency to avoid that problem? ...