2

I have installed Ubuntu 16.04 two days ago on a 158GB HDD and it is already showing 128GB space is used. After checking the drive I've found that the directory /var/log is occupying 116GB and it is constantly expanding its size,

Size of different files in /var/log is :

  • syslog -- 21GB
  • syslog1 -- 36GB
  • kern.log -- 57GB

Now I see this problem is faced by many Ubuntu users and there are different questions have already been asked 1, 2, 3 and 4. But I don't know which folder I should delete.

Furthermore, I am using HP Probook 440 G3.

Help in this regard is highly appreciated. Thanks!

cst
  • 525
  • 1
  • 5
  • 17
  • 3
    You don't want to delete those files... yet. You need to review them to see what activity is occurring on your computer that 'causes the log files to get so large. In `terminal`, type `more syslog*` or `more kern.log`. – heynnema Feb 05 '17 at 15:04
  • @heynnema but how can I able to monitor the activity? I means list is too long which I am not able to understand. So what to do now? – cst Feb 05 '17 at 15:25
  • In `terminal`, use `tail -f /var/log/syslog` or `tail -f /var/log/kern.log` to monitor syslog/kern.log in real time. – heynnema Feb 05 '17 at 15:33
  • @heynnema these are screenshots of syslog and kern.log activities: [syslog](https://www.dropbox.com/s/3s5jh17qovl9j13/Screenshot%20from%202017-02-05%2020-36-00.png?dl=0) [kern.log](https://www.dropbox.com/s/yln0v5ixfaz7bkc/Screenshot%20from%202017-02-05%2020-40-27.png?dl=0) – cst Feb 05 '17 at 15:39
  • See my updated answer, below. – heynnema Feb 05 '17 at 15:46

1 Answers1

3

You don't want to delete those files... yet. You need to review them to see what activity is occurring on your computer that causes the log files to get so large. In terminal, type more /var/log/syslog* or more /var/log/kern.log.

If the files are too large, or you have trouble interpreting what you're seeing, monitor them in real time... in terminal, use tail -f /var/log/syslog or tail -f /var/log/kern.log. You'll probably see one error that repeats itself over and over.

In reviewing the log files, you have a problem with your video subsystem. See Nvidia GeForce 930M driver and PCI bus error for a similar problem/fix. Also see https://h30434.www3.hp.com/t5/Notebook-Software-and-How-To-Questions/Error-Spam-AER-id-00e5-PCIe-Bus-Error-severity-Corrected/td-p/5933687 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1521173. Google "device id 8086:9d15" if you need more info yet.

In terminal...

  • gksudo gedit /etc/default/grub
  • add pci=nomsi OR pci=noaer (which ever one fixes your problem) to
    • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"
    • or
    • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"
  • save and quit gedit
  • sudo update-grub
  • reboot
heynnema
  • 68,647
  • 15
  • 124
  • 180
  • these are screenshots of syslog and kern.log activities: [syslog](https://www.dropbox.com/s/3s5jh17qovl9j13/Screenshot%20from%202017-02-05%2020-36-00.png?dl=0) and [kern.log](https://www.dropbox.com/s/yln0v5ixfaz7bkc/Screenshot%20from%202017-02-05%2020-40-27.png?dl=0) – cst Feb 05 '17 at 15:43
  • but I don't have a Nvidia graphics card in my machine? – cst Feb 05 '17 at 15:51
  • @MuhammadToseef see my update. – heynnema Feb 05 '17 at 15:56
  • let me check it. – cst Feb 05 '17 at 16:07
  • no success :( I've tried – cst Feb 05 '17 at 16:58
  • Did you reboot after each edit and update-grub? You tried both edits, and neither one works? In terminal, type `grep -i cmdline /etc/default/grub` and show me the output. – heynnema Feb 05 '17 at 17:03
  • OMG it works. The error messages aren't showing anymore after checking by `tail -f /var/log/syslog`. But now how can I delete old folders which are occupying so much space? – cst Feb 05 '17 at 17:10
  • Which one did you use... nomsi or noaer? In terminal, `sudo rm -i /var/log/filename`. – heynnema Feb 05 '17 at 17:14
  • I've tried both ones but the second one works, `noare`. – cst Feb 05 '17 at 17:15
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/53082/discussion-between-muhammad-toseef-and-heynnema). – cst Feb 05 '17 at 17:20