06 Aug
It’s widely regarded that the best practice is to set the time zone of a server to UTC if people are going to be doing sys-admin work from various countries. I’m currently running some RHEL4 servers that are set to Los Angeles time. So I have to convert the time from Melbourne time [...]
Posted in unix-tips by: etbe
6 Comments
05 Jun
The man page for the date command says that the %s option will give “seconds since 1970-01-01 00:00:00 UTC“. I had expected that everything that date did would give output in my time zone unless I requested otherwise.. But it seems that in this case the result is in UTC, and the same [...]
Posted in unix-tips by: etbe
6 Comments
16 Apr
Uwe Hermann has described how to resize a root filesystem after booting from a live-cd or recovery disk [1]. He makes some good points about resizing an LVM PV (which I hadn’t even realised was possible).
The following paragraph is outdated, see the update at the end:
Incidentally it should be noted that if your root [...]
Posted in Linux, unix-tips by: etbe
2 Comments
27 Feb
Someone asked on a mailing list how to redirect output from a running process. They had a program which had been running for a long period of time without having stdout redirected to a file. They wanted to logout (to move the laptop that was used for the ssh session) but not kill [...]
Posted in unix-tips by: etbe
9 Comments
01 Nov
Other Unix systems apparently calculate the load average differently to Linux. According to the Wikipedia page about Load(computing) [1] most Unix systems calculate it based on the average number of processes that are using a CPU or available for scheduling on a CPU while Linux also includes the count of processes that are blocked [...]
Posted in unix-tips by: etbe
5 Comments
28 Sep
There is a wide-spread myth that swap space should be twice the size of RAM. This might have provided some benefit when 16M of RAM was a lot and disks had average access times of 20ms. Now disks can have average access times less than 10ms but RAM has increased to 1G for [...]
Posted in unix-tips by: etbe
38 Comments
02 Sep
I’ve been having problems with one of my Xen virtual servers crashing with kernel error messages regarding OOM conditions. One thing I had been meaning to do is to determine how to make a core dump of a Xen domain and then get data such as the process list from it. But tonight [...]
Posted in Xen, unix-tips by: etbe
5 Comments
18 Jun
# foo=bar
# name=foo
# echo ${!name}
bar
The above example shows how to make a bash environment variable reference the value of another.
# echo ${!f*}
foo fs_abc_opts fs_name
The above example shows how to get a list of all variables beginning with “f” (NB the wildcard can only go at the end).
Share This
Posted in unix-tips by: etbe
No Comments