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
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 ...
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 ...
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 ...
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)?
125
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 ...
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. ...
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 ...
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, ...
4
votes
2answers
1k views

Is there a log of past threads that are now closed?

Sometimes, I have a rogue Java process which takes up 100% of my CPU and makes it jump about 30C in temperature (usually resulting in a crash if not killed). Problem is, I can never really identify ...
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.
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 ...
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 ...
11
votes
4answers
2k 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 ...
5
votes
2answers
4k views

Access history of a file [duplicate]

I was wondering if there are any tools to keep track of the access history of a file. I know of stat, but as far as I understand, it only returns information about the last time the file was accessed.
10
votes
3answers
10k 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 ...
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?
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' ...
33
votes
8answers
154k 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 ...
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 ...
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 ...
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 ...
10
votes
2answers
658 views

Print pids and names of processes as they are created

From the question here, the OP wants to repeatedly poll the pid of a process using pidof in a shell script. Of course this is inefficient as a new process must be started for the pidof program ...
8
votes
2answers
20k views

Tracking what commands were executed after sudo to another user

I have provided sudo to ten users to become another user like nsup. I want to track which user executes which command after they become nsup. If there is a way to store the log files in a common file ...
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 ...
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 ...
4
votes
2answers
288 views

Monitor a program's I/O

I have a program which spawns several child processes. I want to know which files this program and its children are creating, deleting, and modifying. inotifywait can tell me which files are being ...
215
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 ...
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 ...
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 ...
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 ...
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 ...
9
votes
1answer
6k views

What are Kernel PMU event-s in perf_events list?

Searching for what one can monitor with perf_events on Linux, I cannot find what Kernel PMU event are? Namely, with perf version 3.13.11-ckt39 the perf list shows events like: branch-instructions OR ...
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 ...
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 ...
10
votes
2answers
2k 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. ...
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 ...
3
votes
1answer
2k views

Writing triggers for mcelog

Just starting to look into mcelog for the first time (I've enabled it and seen syslog output before, but this is the first time I'm trying to do something non-default). I'm looking for information on ...
9
votes
1answer
5k 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 system-...
9
votes
3answers
3k 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 ...
4
votes
1answer
3k views

User's executed commands log file

In Unix based systems, is there a log file that stores user's executed command(s)?
4
votes
2answers
602 views

Is there a tool for tracking uptimes across reboots?

A tool such as this might on the surface appear to serve no real useful purpose, but people that take care of systems like to brag, and uptime is just one of those things that they like to brag about ...
2
votes
2answers
1k views

How to identify the program that uses most bandwidth?

How can I know which application is using the most network bandwidth? I saw some graph from KDE's network monitor, but don't know which process did that.
4
votes
4answers
2k views

Is there any way to see how much data I sent via Internet?

A big German ISP (Telekom) recently decided to volume limit their DSL internet connection to 75GB per month. Now I would like to know how much I download / upload. I use Linux Mint 14 Nadia and I ...
3
votes
3answers
22k views

How to track/log commands executed on a shell?

Can commands be written to a logfile before they were executed in any shells? I know there is a patch for ssh to log all commands from ssh sessions, but i want to log even commands executed from a ...
2
votes
0answers
473 views

Per-user GPU usage on a Linux machine (CUDA)

I use the CUDA toolkit to perform some computations on my Nvidia GPUs. How can I see the per-user GPU usage on a Linux machine (CUDA)? nvidia-smi doesn't seem to contain information: I am aware I ...
1
vote
1answer
536 views

How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port?

OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the ...
1
vote
1answer
3k views

udev monitor hotplug rule not running

I have setup a basic udev rule to detect when I connect or disconnect a mDP cable. The file is /etc/udev/rules.d/95-monitor-hotplug.rules KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{...
0
votes
1answer
686 views

Confused about using the Zabbix Template MySQL (800+ items)

Please explain the full use of this template.link template I searched very much on Google, I have configured as described but i can't use this yet. Can you fully explain? i have two centos 7. zabbix ...
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 ...
17
votes
8answers
14k views

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

Please give a brief description for each tool.