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

29
votes
5answers
33k 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.
22
votes
5answers
13k 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)?
19
votes
3answers
10k 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 ...
17
votes
1answer
2k 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 ...
16
votes
3answers
13k 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 ...
16
votes
4answers
12k 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 ...
15
votes
4answers
10k 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 ...
15
votes
3answers
35k 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 ...
15
votes
3answers
5k 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. ...
14
votes
5answers
22k 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 ...
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.
14
votes
3answers
2k 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, ...
13
votes
4answers
3k 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
4k 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 ...
12
votes
1answer
10k 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.
11
votes
7answers
4k views

What are some common tools for intrusion detection?

Please give a brief description for each tool.
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
4k 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
426 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
3answers
577 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 ...
10
votes
2answers
355 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.
9
votes
6answers
3k 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
2answers
257 views

Internet connection drop alert

What software is there that will play an alert (PC speaker) when there isn't any internet connectivity for 5 minutes? My switch/router seems to disconnect every few days, and I want to reset it when ...
9
votes
2answers
6k 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
5answers
847 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 ...
9
votes
1answer
241 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
188 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
15k 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
3answers
4k 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 ...
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
3k 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
465 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
550 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
1answer
369 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 ...
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
486 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
392 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
3answers
9k 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 ...
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
4answers
13k 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 ...
6
votes
2answers
746 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
2answers
391 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
764 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
2answers
472 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
3answers
30k 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
2k views

How to I install zabbix-agent over apt-get

Why is it that on my Ubuntu 13.04 system I can easilly install zabbix-agent by doing apt-get install zabbix-agent. When I do it in Debian 7.1, it says that the package zabbix-agent can not be found. ...
5
votes
1answer
194 views

simple script for monitoring a mailserver

I would like to use a simple bash script (python would be second best) to monitor regularly (hourly) if my mailserver is online and operating. I know that there are dedicated solutions for this task ...
5
votes
1answer
1k views

Getting disk i/o statistics for single process in Linux

I need to monitor the I/O statistics of a process that writes to disk. The purpose is to avoid write rates too high for long periods. I know there's iostat tool to accomplish this task on a ...
5
votes
1answer
345 views

DTrace to trap any chmod applied to certain files

Underneath the Mac OS X directory /audit I have certain files which users can access and chmod to their liking. I need to audit any chmod done on any files by recording the time, user and file being ...