Tag Info

Hot answers tagged

67

I recommend combining the previous answers watch -n 5 free -m Note that Linux likes to use any extra memory to cache hard drive blocks. So you don't want to look at just the free Mem. You want to look at the free column of the -/+ buffers/cache: row. This shows how much memory is available to applications. So I just ran free -m and got this: ...


35

I think htop is the best solution. sudo apt-get install htop This way you will notice what programs is using most RAM. and you can easily terminate one if you want to. Here's a screenshot!


24

You must not remove the entire folder but you can remove "Old-Packed" log files without harming your system. For a typical home user, it's safe to remove any log file that is compressed and has a .gz extension (as you can see in the picture). These compressed log files are old logs that are gzipped to reduce storage space, and as an average user, you don't ...


20

I wouldn't delete the entire /var/log folder - that will break things. You could just destroy the logs as @jrg suggests - but unless the things writing to the log files (mostly syslogd) are restarted that won't actually regain you any disk space, as the files will continue to exist in a deleted state until the filehandles are closed. Better would be to ...


20

If you looking for a nice breakdown of the memory used by each running process, then I might recommend checking out ps_mem.py (found here at pixelbeat.org). The script even consolidates memory shared across multiple threads of a process (see apache2 in the example below). I know in the comments above, you mentioned wanting a one-line snapshot from free, ...


19

Use the last command. last -x | grep shutdown last -x | grep reboot You can pipe this to the head to read the last n instances. For example, in your case: last -x | grep shutdown | head -n 10 You also should set BOOTLOGD_ENABLE=Yes in the '/etc/default/bootlogd' file (it could be No by default).


17

Syslog is a standard logging facility. It collects messages of various programs and services including the kernel, and stores them, depending on setup, in a bunch of log files typically under /var/log. In some datacenter setups there are hundreds of devices each with its own log; syslog comes here handy too. One just sets up a dedicated syslog server which ...


14

You should look at the logs and see what is getting written to them. My guess is ufw/iptables (you are logging all network traffic). ufw - when you log all packets, you will get large logs. If you are not going to review the logs, turn logging off. If you wish to monitor your network, use snort. Snort will filter through the thousands of packets you receive ...


13

The host receiving the logs will need to be running some syslog daemon that is configured to listen for remote logs. There are a number of syslog implementations in Ubuntu, but rsyslog is typically recommended, and should be installed by default. I can't tell from the documentation in the link you posted if DD-WRT is sending logs via TCP or UDP, so it may ...


11

Use Udev. Udev is a device manager daemon. Amongst other things it is responsible for naming your devices. You can define udev-rules by putting files with a certain syntax in the rules directory. The rules can do many things - in particular they can run scripts, when a certain device is connected. How to solve your problem: First you need to gather ...


11

If you want something that does not depend on a desktop: Have a look at lm-sensors . From the description: Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems. This package contains programs to help you set up and read data ...


10

There is a file called /etc/X11/Xsession. Which will create the symlink to a tmp file. IE. Starts on line number 61 ERRFILE=$HOME/.xsession-errors # attempt to create an error file; abort if we cannot if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] && [ ! -L "$ERRFILE" ]; then chmod 600 "$ERRFILE" elif ...


9

It is probably the Orca screen reader that does this. Turn it off if you do not want this to happen. (hit dash and search for orca) Oh and it is possible you turned it on, by accident, at the login screen. Make sure "Screen Reader" is unticked.


8

This is an excerpt from man pulseaudio --log-level[=LEVEL] If an argument is passed, set the log level to the specified value, otherwise increase the configured verbosity level by one. The log levels are numerical from 0 to 4, corresponding to error, warn, notice, info, debug. Default log level is ...


7

Possibly you are affected by this bug: "Does not log fsck invocations in /var/log/fsck/"


7

That is the default traditional format. To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog: open with admin privileges the file /etc/rsyslog.conf and add the following lines $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%\n" ...


7

syslog contains all the messages except of type auth. messages contains only generic non-critical messages. The category is info , notice and warn For complete log look at /var/log/syslog and /var/log/auth.log AFAIK /var/log/kern.log contains kernel messages. log files are just a convention spelled out in /etc/syslog.conf read syslog(3) for more information ...


7

Use the free command. For example, this is the ouput of free -m: total used free shared buffers cached Mem: 2012 1666 345 0 101 616 -/+ buffers/cache: 947 1064 Swap: 7624 0 7624 free -m | grep /+ will return only the second line: -/+ ...


6

The watch command may be useful. Try watch -n 5 free to monitor memory usage with updates every five seconds.


6

You can use the command dmesg -n 1 to suppress all messages from the kernel (and its drivers) except panic messages from appearing on the console. To fix at each boot, add the command to: /etc/rc.local


6

Almost all of the logs are stored in /var/log. Example: /var/log/syslog, /var/log/dmesg, etc.. You could use the Log File Viewer to view them nicely if you want to.


6

Short version The log entries should actually show up in dmesg. Despite that, they do not show up by default in /var/log. If you want them in /var/log too, add $KLogPermitNonKernelFacility on to rsyslogd's config. I suggest creating a custom file like /etc/rsyslog.d/60-custom.conf to avoid editing /etc/rsyslog.conf, since that's managed by dpkg. Now ...


5

As @bain mentioned, the package is called logrotate. To rotate this file as you have mentioned, you could use the following configuration in /etc/logrotate.d/irc: /home/irc/ircd.log { daily rotate 7 compress missingok create 0644 irc irc su irc irc } A breakdown of the configuration options: The daily option tells logrotate to ...


5

Use the built-in command history: history -w hist.txt will save the current history into file hist.txt. If you have write permsiions to the appropriate directory you could do something like: history -w /var/www/html/latest_history.txt Then your students could access it in a browser: http://teachers.ip.address/latest_history.txt


5

Install and configure the sysstat package, which does just what you're asking for. sudo apt-get install sysstat


5

If you use something like bash as a command interpreter, you could check the history. more /home/user/.bash_history


5

Looks like kernel logging will be output to /var/log/kern.log in Natty. The line you're seeing (Kernel logging stopped) will have been the last entry before the output was switched to the new file. This is all configured in /etc/rsyslog.conf and /etc/rsyslog.d/*.conf, if you're keen to poke around.


5

If you go for point 1 and it says that www-data should have at least read permission then the recomended is grant only read. You can alter the line (in logrotate file): create 640 root adm to create 644 root adm To give all users (www-data included) read permission. You'll need to change permissions existent files in /var/log/apache2/ to match this ...


5

I didn't find a magic bullet answer to your question; part of that reason is detailed here: http://superuser.com/questions/178596/checking-user-command-history-in-unix This simple command may help you track down what happened, searching for rm & mv commands in all shell history files in all users home directories: find /home -type f -iname .*history ...



Only top voted, non community-wiki answers of a minimum length are eligible