Category: Ubuntu

  • Ubuntu: How to update PHP’s timezone

    Ubuntu: How to update PHP’s timezone

      We came across this one recently when setting up a Zabbix server, where the installation would not proceed until the PHP timezone was set. This is quite straightforward – using your favourite editor edit:   /etc/php5/apache2/php.ini   Look for the Module Settings section or search for:    date.timezone   (in vi /date.timezone should get…

  • How to remove/delete old or unused kernels in Ubuntu

    How to remove/delete old or unused kernels in Ubuntu

      If you have upgraded your kernel you will have found that Ubuntu keeps the older ones around, which can be handy if something breaks in the newer kernel and you have to boot from your old system. Over time, however, these can add up in terms of the amount of space consumed – at…

  • Monitoring network usage on Ubuntu

    Monitoring network usage on Ubuntu

      If you want to see how much traffic is passing through your network port there’s a handy tool called vnstat which will tally the amount of data passing through. You can install it with:   sudo apt-get install vnstat   It will usually add the databases and network ports automatically like so:    …

  • MythTV backend DVB adapter error: ERROR_OPEN

      If you see the above error when you’re trying to set up your DVB tuner card one cause is that MythTV can’t get access to the tuner card. This can be because there’s another application installed which has access to it, e.g. something like TVHeadend. On XBMCBuntu you can uninstall TVHeadend by running the…

  • How to find number of cores in Ubuntu (or other versions of Linux)?

    How to find number of cores in Ubuntu (or other versions of Linux)?

      If you’re using a virtual server (whether online or your own physical machine) it can be handy sometimes to check how many CPU cores are available; here are two easy methods of doing this. The first:   nproc   This will return a single number, whether it be 1, 2, 4 or otherwise. For…

  • Samba log showing error: failed to retrieve printer list

    Samba log showing error: failed to retrieve printer list

      If you’re using Ubuntu and seeing the following error in your Samba log:   Failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL   If you are a home user and using samba purely for file sharing from a server or NAS you’re probably not interested in sharing printers through it. If so, you can prevent this…

  • How to see individual CPU core loads in Ubuntu

    How to see individual CPU core loads in Ubuntu

      This is an interesting one – if you have the need to monitor your CPU usage individually across cores it’s actually quite easy with the top command. Simply run top and hit “1” – your output will go from:   to:   In this case the server is a hexcore (0-5 cores shown, 6…

  • How to kill a process after a set period of time

    How to kill a process after a set period of time

      Knowing how to limit how long a process will run for is quite useful, particularly when you have daily backup scripts and the like which may at times run more than 24 hours; having multiple processes attempting to synchronize the same files can waste time, bandwidth and CPU power needlessly. The command we will…

  • How to easily find the full path of a command in Ubuntu

    How to easily find the full path of a command in Ubuntu

      If you’re writing scripts or making cron jobs you will need to know the full path of the commands you’re using; rather than just being able to use “ls” you would have to use “/bin/ls” instead. You could use the find command here but there’s a quicker and more elegant way: which. Use it…