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

15
votes
4answers
8k 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 ...
2
votes
2answers
714 views

How to detect and stop user from deleting particular file on Linux?

Is it possible to monitor user actions on the file system and prevent him from performing particular actions? Can inotify only monitor actions on the file system? What about fanotify? There's very ...
3
votes
2answers
360 views

How to identify if there is some power saving setting that powered down a processor in Linux

I have a linux server that apparently has two Intel Xeon X5670. /proc/cpuinfo shows 12 CPUs but dmidecode shows only one CPU and the other one is in the Unpopulated status like it is showing that ...
15
votes
3answers
33k 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 ...
3
votes
3answers
220 views

Track daily directory changes (and email them)

I have a Debian powered NAS server (ReadyNAS) with a deep file hierarchy. I'd like to get notified daily about what has changed in some of its directories and their subdirectories. So if someone ...
1
vote
3answers
354 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 ...
2
votes
2answers
348 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 ...
14
votes
5answers
20k 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 ...
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 ...
2
votes
2answers
410 views

Measuring CPU and Memory per user to distribute “cost” of a server

How should I implement approximately correct per-user monitoring on a server? I want a way to split the cost of a server between the users based on their usage. On newer machines (RHEL6) I would use ...
3
votes
1answer
1k views

How to enable nagios user created by yum to use check_by_ssh

I've used yum install nagios on an Amazon Linux instance, and it created a nagios user with shell /sbin/nologin and homedir /var/spool/nagios. This is the behaviour on EC2. I want to use check_by_ssh ...
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, ...
4
votes
1answer
2k views

What is the difference between /proc/self/stack and output from pstack?

I have been looking through the documentation for /proc and the "stack" object being a new'ish object in proc, I have also looked through the kernel commit to create it -- however the documentation ...
2
votes
2answers
1k views

Make iotop show only the most disk-intensive item

My laptop (no VM, just plain Ubuntu with encrypted home) freezes for 3 minutes a few times per day. During these 3 minutes, the disk LED indicates intense disk activity, and I can't even move the ...
2
votes
2answers
1k views

What do the three values mean on network monitoring tools

Often in network monitoring tools there are three values for one measure. Ex rx: 2.0 kb/s 40 kb/s 10 kb/s Are these similar to how cpu load works, they are taken at different length time spans. ...
11
votes
5answers
408 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 ...
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
337 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 ...
2
votes
0answers
136 views

What is the recommended way of start and supervise daemons on Arch Linux? [duplicate]

Possible Duplicate: Ensure a process is always running At the moment I use a quick and dirty nohup ... & to start application and database servers. E.g. su - foo -c "nohup php-cgi -b ...
2
votes
3answers
1k 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 ...
2
votes
1answer
91 views

Reporting Network and Vital Statistics and writing to db and image

I am looking for a versatile tool that can write either to a MySQL db, or possibly simply even just write some image charts (that i can display on a PHP dashboard) to monitor my network health. Is ...
6
votes
4answers
12k 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 ...
13
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. ...
19
votes
3answers
9k 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 ...
4
votes
2answers
1k views

Access history of a file

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. ...
2
votes
7answers
1k views

Linux server monitoring software

The dedicated server I'm looking after started to crash occasionally, I suspect because of overload, so I need some performance/resource based monitoring software, preferably with web interface, ...
1
vote
1answer
792 views

Automount lookup failed. How to determine what is trying to access the file?

Is there a way to find out what is trying to mount this file? Jul 13 14:27:24 myhost automount[13527]: lookup(file): lookup for tmp_dir failed Something is looking for "tmp_dir", and I've ...
2
votes
1answer
127 views

Is there a way to determine which process creates a file on osx 10.6.8

I would like to know which process has created files on os X 10.6. I'm trying DTrace, which probably will give the right answer, but I have not eyes to see the method. I'm doing this because I think ...
1
vote
1answer
590 views

Make top shows only server process

Can I make top show info about the web and db servers? Can it be done by piping the pids to the top? They can be many process from every one?!? Or is there any better method for this?
5
votes
2answers
448 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 ...
2
votes
1answer
781 views

Monitoring the OpenSSH sFTP process?

Is there a way to monitor the current status of my sFTP process from my Debian server? I'm looking from something similar to top or netstat that will give me the status/progress of activities ...
7
votes
2answers
454 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? ...
0
votes
1answer
383 views

Turning off mailing in psad

The psad monitoring tool keeps on sending lots of mail to my localhost admin account. I use my ubuntu server as a NAT router, and psad warned me to enable logging in iptables. After I did so, it ...
5
votes
1answer
779 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, ...
3
votes
1answer
249 views

find out the culprit process

This is rather a basic linux administration question. We have a CentOS linux machine running a production application. There are 10 application specific processes running on that machine. Once in ...
3
votes
1answer
110 views

Is there a way to tell which file (script, specifically) executed a command?

I'm running Slackware 13.37, and I was wondering if there was a way to tell which script executed a command. I tracked the process and its arguments, but I would like to know where the command ...
22
votes
5answers
12k 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)?
1
vote
1answer
1k views

How to monitor traffic when SSH tunneling?

If I run: ssh -fND localhost:6000 USERNAME@IPADDRESS -p PORTNUMBER and I set my webbrowser to use 127.0.0.1:6000 SOCKS5 proxy, is there a way for the remote SSH server to monitor my web traffic? ...
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 ...
2
votes
3answers
376 views

Port monitoring on GNU/Linux based NAT router

I am using a Ubuntu machine as a NAT router. How can I find out the following: the ports on which the LAN machines are listening or communicating (both tcp and udp); which local machines have ...
4
votes
5answers
444 views

Unpredictable memory explosions

The main server at my company has recently been having a lot of downtime. For reasons that neither I nor the other admins can determine, it has random (VERY sudden) explosions in memory. It becomes ...
4
votes
4answers
11k 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 ...
7
votes
3answers
521 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 ...
3
votes
1answer
260 views

Linux system calls

I want to obtain information about memory used by different users and different processes which users are running and statistics about those processes like memory consumption ,execution speed etc ...
1
vote
0answers
238 views

Using device node of host bus adapter to send ioctl calls to monitor RAID status

I am interested in determining the status of a RAID array on my system (using Debian, and Intel ICH10R sata RAID controller = fakeRAID). What I have learned so far is that: I can use CSMI I/O ...
1
vote
1answer
102 views

How can I test the system footprint of applications?

I am about to develop a piece of software and I want to ascertain the impact it has on my system. The main things I am look for are load times, memory and CPU usage and shutdown time, although I would ...
4
votes
3answers
2k 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 ...
4
votes
5answers
404 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 ...
16
votes
3answers
12k 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 ...
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 ...