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

learn more… | top users | synonyms

22
votes
4answers
26k 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.
21
votes
4answers
9k views

Determine which process is creating a file

Given file path, how can I determine which process creates it (and/or reads/writes to it)?
18
votes
3answers
7k 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 ...
16
votes
1answer
1k 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 ...
15
votes
3answers
11k 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 ...
14
votes
3answers
28k 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 ...
14
votes
3answers
9k 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 ...
14
votes
3answers
2k 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.
13
votes
5answers
15k views

Script to monitor folder for new files?

How do I 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 ...
13
votes
4answers
2k 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 ...
13
votes
5answers
3k 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 ...
13
votes
3answers
925 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, ...
12
votes
4answers
5k 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 ...
11
votes
5answers
2k views

What happens when I open and read from /proc?

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 ...
11
votes
9answers
3k 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 ...
11
votes
5answers
389 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 ...
11
votes
1answer
9k views

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

The title says it all. Using Fedora for a small Samba and development server.
10
votes
7answers
2k views

What are some common tools for intrusion detection?

Please give a brief description for each tool.
10
votes
2answers
353 views

Linux program to look into what you're downloading

Is there a linux program that allows you to look into your current download traffic? Something that can list all the addresses I am currently connected to and downloading from.
10
votes
5answers
802 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 ...
10
votes
3answers
465 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 ...
9
votes
6answers
2k 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?
9
votes
3answers
4k 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. ...
9
votes
2answers
5k 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 ...
9
votes
1answer
219 views

How can I track executables created by my user on Linux?

Using Linux, I would like to track the executables that are executed in my name, including the whole command line (in practice, every exec*() done as my own user). A program I do not control is ...
9
votes
2answers
142 views

How do I get the current bandwidth speed of an interface from the terminal?

I want to get the current Bandwidth of an interface say "eth0" from the terminal. It better be as simple as possible. Say up 10 dn 30. Instead of giving out a lot of text like "vnstat" does. ...
8
votes
5answers
10k 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 ...
8
votes
2answers
1k views

How can I list the top IO consuming files?

My document management software is doing a lot of IO and I would like to know which files it is accessing the most. Is there a Linux tool that would give me the list of the top IO consuming files, ...
7
votes
3answers
1k 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 ...
7
votes
3answers
2k views

How can I monitor disk I/O in a particular directory?

I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of disk block reads and writes over a period (not just file access) to test whether ...
7
votes
2answers
414 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? ...
7
votes
3answers
458 views

Forcing an 'added' alias to every command

Is it possible to forcibly add a timing alias (for lack of a better way to phrase it) to every command in bash? For example, I would like to have a specific user who whenever a command is run, it is ...
7
votes
3answers
2k views

How do you choose which monitoring application to use?

Having a system for collecting performance statistics can be extremely useful. In the past, I've used Munin for this, and it has been invaluable in analyzing bottlenecks and various other issues. I ...
7
votes
3answers
3k 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 ...
7
votes
3answers
443 views

How to track down memory spikes?

I have an app running on rackspace cloud (ubuntu 10.04). For some reason, over the last 3 nights, the memory has been spiking and then leveling off for about 7 hours before eventually falling off. ...
7
votes
3answers
343 views

What are some good profiling tools for Linux?

I'm looking for some good profiling tools for Linux like OProfile. What I would like to see is how the operating system manages the interrupts, cache, read/writes, etc (lots of other intricate ...
6
votes
4answers
207 views

Quantify unix responsiveness

I am one of the n users of a shared unix machine. For reasons unknown, the machine is not "responsive" enough. For example, it is slow on interactive commands, it takes few noticeable moments for any ...
6
votes
2answers
610 views

Is it possible to know who visited my home directory?

Suppose there are many users in a Linux cluster, each of them has his own HOME directory under /home/xxx, with xxx being his user name (or account). If the initial system configuration allows these ...
6
votes
1answer
217 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 ...
6
votes
1answer
2k views

Monitoring USB traffic

Kernel version: 2.6.31-22 I wish to monitor the USB traffic to and from a device. I've searched, but different sites seem to give different information and I'm confused. Some sites suggest that I ...
6
votes
2answers
350 views

Linux workstation monitoring tools

I am currently working in a company that runs Linux (openSUSE 12.1) on the workstations (about 200 computers). I am looking for a tool or methods that could allow me to monitor them remotely, upgrade ...
5
votes
5answers
524 views

How to see the commands executed in another shell?

Is there a way to watch what commands are being executed in another shell, as they're being executed? Both shells are bash, and I have root access, if that matters. I can't install any extra software, ...
5
votes
3answers
6k 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 ...
5
votes
2answers
388 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 ...
5
votes
2answers
22k 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 ...
5
votes
1answer
658 views

Measuring Python script bandwidth usage

I have a python script that uses urllibs to parse some web pages, and uses selenium to scrape pages with javascript, and I would like to know its cumulative bandwidth usage. I've looked at nethogs, ...
5
votes
1answer
3k views

Monitor mode wifi only seeing broadcast packets

I have pretty much exhausted every link I have found on google regarding this topic, and I'd like some of the most experienced eyes on the problem, because something obscure must be going on. Systems ...
4
votes
2answers
430 views

How can I see dumps of wholе HTTP packets?

I need to see whole HTTP packets sent and recieved by an application for debugging purposes. How can this be done in command-line?
4
votes
5answers
371 views

performance monitoring

Is there some performace monitoring tool which would run in background gathering info about all system activity? Somethimes my system (Arch linux, 32 bit) slows down terribly and the top utility ...
4
votes
5answers
368 views

Network monitoring tool

I'm basically looking for a utility that displays which processes are using how much bandwidth, similar to how top displays which processes use how much resources.