- is kind of jealous is his wifes new inspiron laptop – though not the way she had to get it – anyone want to run my laptop over? #
- back in the Uk with a daughter who seems to think its 4pm… and so not sleeping! #
- #MotionX Share: last map longest walk off road too! v nice colours. http://bit.ly/2PpuQn #
- #MotionX Share: http://bit.ly/3dnqm1 #
- #MotionX Share: http://bit.ly/2WxSYf #
Twitter Weekly Updates for 2009-10-18
- Minus six! #
- Snooowww yay http://bit.ly/12O7kx #
- #MotionX Share: pretty bice walk at bear freezing temps lost gps near the halfway point but you can get the idea. http://bit.ly/376tAy #
Twitter Weekly Updates for 2009-10-04
- Is wondering how make his daughter realise he is not a hand clothe…. #
- Has just finished the new corp site relaunch http://bit.ly/FDxf9 – at last a centered page 🙂 #
Twitter Weekly Updates for 2009-09-27
- Is in the midlasa this weekend little one is nearly two!! #
Twitter Weekly Updates for 2009-09-06
- Wondering why lil kids talk to their food. GPS location: http://bit.ly/g6Rnx ☻ #
Twitter Weekly Updates for 2009-08-02
- #MotionX Share: http://bit.ly/LdDpY #
- #MotionX Share: http://bit.ly/DuRDH #
- #MotionX Share: http://bit.ly/d4mcw #
- #MotionX Share: http://bit.ly/15m9W3 #
- #MotionX Share: http://bit.ly/e3HoU #
- #MotionX Share: http://bit.ly/dD7GA #
Twitter Weekly Updates for 2009-07-26
- #MotionX Share: http://bit.ly/czeK #
Exim Mail Server Commands
Those of you with Exim will sometimes needs to do some work on it – here’s a list of the commands which I find most useful:
If you want to see what exim is doing right now :
“exiwhat”
if you think you have queue problems then you can print a countof messages in the queue this will often be quite high – so it’s worth running it a few times over a couple of hours to see if you have a queue problem:
“exim -bpc”
If you want more information about what is in the queue then the following command will give you the count, the colume, oldest, newest, domain to be sent to and total summaries. The oldest and volume parts are often the most informative in this to help you see problem domains.
“exim -bp | exiqsumm”
Below are some commands to help you manage the queue – especially useful if you want to try to purge it or take action.
To tell exim to try to deliver things in the queue according to the rules for a queue run
“exim -q -v”
If you are blocked up with external mail you can tell exim to run the queue to deliver local mail only – this may help you get things such as notifications etc.. if they are delayed by other mail in the queue
“exim -ql -v”
If you have some problems with older mail (maybe spam related) – you can use the following to delete mail that over 7 days old (the time given is in seconds so just take one day 86400 and multiply it by 7)
“exiqgrep -o 604800 -i | xargs exim -Mrm”
There are many many other commands and other examples – some sites have longer lists, but these are all the commands I have needed (or variations thereof) for administrating my servers over the last 9 years.
Twitter Weekly Updates for 2009-07-19
- Am I getting old if I am seriously considering a trilby?? #
- #MotionX Share: http://bit.ly/CVKRl #
How to use crontab to schedule tasks in Linux
Another of the most useful tools in server administration is the Crontab – you use this to schedule jobs (programs) to run at regular intervals.
These tasks can be varied, from restarting servers, services – creating files, changing permissions, runing batch programs, deleting files etc…
Of course sometimes crontab is not the best solution as it can have several problems – in which case other choices are available – including writing your own – however we will cover that another time.
First a coouple of facts about cron:
- Cron has evolved a bit since inception but the basic principles are the same – old server admins are as good as new ones with this tool!
- Cron will run new jobs at most once a minute – that’s the smallest resolution you can have.
- Old systems used to wake up every minute and check for new work – the same as a simple replacement service might do – however this didn’t scale well when cpu power was low but users high on old mainframe systems – new systems still only execute once a minute.
- the cron service loads up any relavent cron files (which exist in users home directories or in /etc/cron.d/) and saves the information so it only needs to run when there is really jobs to run – when you edit the crontab it reloads it’s list so it doesn’t need to keep checking for changes – it’s important to edit it right!
- Even if a previous program hasn’t finished – cron can run it again or run more jobs – this can bring down badly configured systems! so be careful how you use it.
Generally to edit the crontab – which is where you would add things to run type in “crontab -e” – this will open it in your system editor (vim is my choice, but others can be used).
you will probably see some content – similar to this:
1 0 * * * shutdown -r now
This means that at one minute past midnight the server will reboot (execture the immediate shutdown and restart command with no delay) each day. The * are wildcards saying that the instruction should run no matter the criteria of that column (if it’s all * then it will run each minute).
The fields are the following: I recommend pasting this in the top of your crontab file – the # at the start mean it will ignore the entries.
# .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * *
Remember if the program has output you can store it in a file the same as you can on the command line – just type ” > /var/log/logfile”
in the entry after the command and it will log output to the file in question.