When managing computer administration, there is a big trap to avoid: update the packages as soon as they are available.
Yes, there is often bug fix or security improvement and it's very important; but it can also be some new functionalities and potentially some unfortunate regression.
When such regression strikes one software/tool, it can generally be fixed (at worst downgrading to the previous version); but when it strikes the operating system or the graphical system, it becomes very boring, frustrating and sometimes very difficult to fix.
So instead of constantly updating packages, it seems better to be informed, see if we are concerned by fixed bug, security issues or if we need the new functionalities.
This way, there is more chance the regarded computer will work better and longer with less service interrupt.
Sunday, 25 October 2009
Stop polling for incoming e-mails
Unfortunately, it seems there are lots of us (computer user) polling for incoming e-mails very, very often; like if very an important thing might be received and to be answered almost immediately.
It can be a very important efficiency loss, because the user cannot focus on his current task.
Although that seems obvious, I've recently realized that it was also my case only after having read an interesting article about that.
Since some weeks, I've seriously changed my way to manage incoming e-mails:
- no more polling
- I've disabled all kind of notification of my e-mailer (no more popup which can be disturbing)
- I've disabled the automatic "read mark" to remove the pressure to answer as soon as possible when I finally check my e-mails.
It's little things but at the end it gives interesting results.
Yes, I answer e-mails later, but there is no dead, no fire, no tsunami, no storm ... and among all others, it gives me more opportunity to focus on my work, and so to be more efficient.
It can be a very important efficiency loss, because the user cannot focus on his current task.
Although that seems obvious, I've recently realized that it was also my case only after having read an interesting article about that.
Since some weeks, I've seriously changed my way to manage incoming e-mails:
- no more polling
- I've disabled all kind of notification of my e-mailer (no more popup which can be disturbing)
- I've disabled the automatic "read mark" to remove the pressure to answer as soon as possible when I finally check my e-mails.
It's little things but at the end it gives interesting results.
Yes, I answer e-mails later, but there is no dead, no fire, no tsunami, no storm ... and among all others, it gives me more opportunity to focus on my work, and so to be more efficient.
Labels:
General
Friday, 18 September 2009
Help ! rpm or yum freezes
Sometimes, rpm, yum or even other commands are freezing without message to understand why (e.g. for yum, just after the message "Running Transaction Test").
Almost each time I've seen that, it was caused by broken mount (usually network ones, when the server at the other side has failed, or has restarted).
To check it:Almost each time I've seen that, it was caused by broken mount (usually network ones, when the server at the other side has failed, or has restarted).
mount
If you see some network mount points you do not need anymore, or you're not sure about, umount them.
If they are broken or if the system wrongly thinks it is busy you can use the -l option (for lazy) to ensure the umount - in fact the system won't fully perform the umount but it will clean the list of mounted point, such a way the launched commands won't freeze anymore.
If they are broken or if the system wrongly thinks it is busy you can use the -l option (for lazy) to ensure the umount - in fact the system won't fully perform the umount but it will clean the list of mounted point, such a way the launched commands won't freeze anymore.
For instance, to umount (lazy) a broken mount point /mnt/myMountPoint:
mount -l /mnt/myMountPoint
Labels:
Administration,
Gnu/Linux
Tuesday, 28 July 2009
Compile LZO, TUN and OpenVPN under Solaris 64bits (revised)
(This post is a revision of this one for Solaris 64bits, and in accordance with new source code versions).
It is possible to get LZO, OpenVPN and TUN under Solaris, compiling the source code.
Because of some compatibility issues, it is not as easy as it can be thought.
You can follow those steps to get openvpn executable under Solaris:
- ensure GNU gcc and make are installed
pkg install SUNWgcc
- download the LZO source code and uncompress it under [LZO_DIRECTORY],
- download the TUN source code and uncompress it under [TUN_DIRECTORY],
- download the openVPN source code and uncompress it under [OPENVPN_DIRECTORY],
- update the path for all needed tools (gcc, gmake, install, ar ...) to be available
export PATH=/usr/sfw/bin:/usr/ucb/:/usr/ccs/bin:/usr/sbin:/usr/bin:$PATH
- compile LZO
cd [LZO_DIRECTORY]
./configure --libdir=/usr/local/lib
make
make install
- configure TUN
cd [TUN_DIRECTORY]
./configure
- edit solaris/Makefile to add options as followed
CFLAGS = -m64 -mcmodel=kernel -mno-red-zone -ffreestanding $(DEFS) -O2 -Wall -D_KERNEL -I.
- compile TUN (ignore the error "Warning: 64-bit version of driver found at /usr/kernel/drv/tun")
make
make install
- move the created tun file (to be regarded as 64bits)
mv /usr/kernel/drv/tun /usr/kernel/drv/amd64/
- load it
devfsadm -i tun
- compile OpenVPN
cd [OPENVPN_DIRECTORY]
./configure --with-lzo-lib=/usr/local/lib --with-lzo-headers=/usr/local/include --prefix=/usr
make
make install
It is now possible to use LZO, OpenVPN and TUN under Solaris.
It is possible to get LZO, OpenVPN and TUN under Solaris, compiling the source code.
Because of some compatibility issues, it is not as easy as it can be thought.
You can follow those steps to get openvpn executable under Solaris:
- ensure GNU gcc and make are installed
pkg install SUNWgcc
- download the LZO source code and uncompress it under [LZO_DIRECTORY],
- download the TUN source code and uncompress it under [TUN_DIRECTORY],
- download the openVPN source code and uncompress it under [OPENVPN_DIRECTORY],
- update the path for all needed tools (gcc, gmake, install, ar ...) to be available
export PATH=/usr/sfw/bin:/usr/ucb/:/usr/ccs/bin:/usr/sbin:/usr/bin:$PATH
- compile LZO
cd [LZO_DIRECTORY]
./configure --libdir=/usr/local/lib
make
make install
- configure TUN
cd [TUN_DIRECTORY]
./configure
- edit solaris/Makefile to add options as followed
CFLAGS = -m64 -mcmodel=kernel -mno-red-zone -ffreestanding $(DEFS) -O2 -Wall -D_KERNEL -I.
- compile TUN (ignore the error "Warning: 64-bit version of driver found at /usr/kernel/drv/tun")
make
make install
- move the created tun file (to be regarded as 64bits)
mv /usr/kernel/drv/tun /usr/kernel/drv/amd64/
- load it
devfsadm -i tun
- compile OpenVPN
cd [OPENVPN_DIRECTORY]
./configure --with-lzo-lib=/usr/local/lib --with-lzo-headers=/usr/local/include --prefix=/usr
make
make install
It is now possible to use LZO, OpenVPN and TUN under Solaris.
Labels:
Administration,
Solaris
Sunday, 19 July 2009
Master your installed tools
Sometimes, we use tools from so long time that we don't know/care/remember where it comes from.
It is particularly true for system tools (e.g. mount, fsck, tune2fs, ls...).
To get such information, installed RPM packages can be requested (like explained in this article).
For instance, to get information about the package providing the mount tool (under GNU/Bash):
rpm -qfi $( which mount)
Then, to see what other tools are provided by this package, check the list of provided files:
rpm -qfil $( which mount)
Usually, using those instructions help mastering installed tools, and to discover some you don't use yet.
It is particularly true for system tools (e.g. mount, fsck, tune2fs, ls...).
To get such information, installed RPM packages can be requested (like explained in this article).
For instance, to get information about the package providing the mount tool (under GNU/Bash):
rpm -qfi $( which mount)
Then, to see what other tools are provided by this package, check the list of provided files:
rpm -qfil $( which mount)
Usually, using those instructions help mastering installed tools, and to discover some you don't use yet.
Labels:
Administration,
Gnu/Linux
Create a specific user for MySQL Database backup
For security reasons, it is interesting to create a specific user for MySQL Database backup with the less privileges possible.
In fact, only LOCK TABLES and SELECT privileges are requested to use mysqldump.
So it is enough to use the following SQL query:
GRANT LOCK TABLES, SELECT ON XXX.* TO 'YYY'@'localhost' IDENTIFIED BY 'ZZZ';
GRANT LOCK TABLES, SELECT ON XXX.* TO 'YYY'@'localhost.localdomain' IDENTIFIED BY 'ZZZ';
FLUSH PRIVILEGES;
With variables:
XXX: the database name
YYY: the specific backup user login
ZZZ: the specific backup user password
The following instruction allows full backup with this limited privileges user:
mysqldump -u "YYY" --password="ZZZ" --all-databases > /path/to/my/dump/file
In fact, only LOCK TABLES and SELECT privileges are requested to use mysqldump.
So it is enough to use the following SQL query:
GRANT LOCK TABLES, SELECT ON XXX.* TO 'YYY'@'localhost' IDENTIFIED BY 'ZZZ';
GRANT LOCK TABLES, SELECT ON XXX.* TO 'YYY'@'localhost.localdomain' IDENTIFIED BY 'ZZZ';
FLUSH PRIVILEGES;
With variables:
XXX: the database name
YYY: the specific backup user login
ZZZ: the specific backup user password
The following instruction allows full backup with this limited privileges user:
mysqldump -u "YYY" --password="ZZZ" --all-databases > /path/to/my/dump/file
Labels:
Administration,
Gnu/Linux
Tuesday, 14 July 2009
Manage SMART disks
Modern hard disks (from ATA-3 and SCSI-3) provide built-in system called SMART (for Self-Monitoring, Analysis and Reporting Technology).
smartmontools provides two utility programs (smartctl and smartd) to control and monitor storage systems using SMART.
It can be installed in RedHat-like systems using yum (yum install smartmontools).
To get "general" Info like device model number, serial number, firmware version... (e.g. /dev/sda):
smartctl -i /dev/sda
To get Health Status of a device - for instance for predicting its own failure within the next 24 hours (e.g. /dev/sda):
smartctl -H /dev/sda
To get SMART Attributes of a device (e.g. /dev/sda):
smartctl -A /dev/sda
To get SMART Capabilities of a device (e.g. /dev/sda):
smartctl -c /dev/sda
To get error information of a device (e.g. /dev/sda):
smartctl -l error /dev/sda
To get all those information and even more about a device (e.g. /dev/sda):
smartctl -a /dev/sda
The smartctl command allows launching some tests.
For instance to launch a short test:
smartctl -t short /dev/sda
To get progress and result information:
smartctl -l selftest /dev/sda
See smartctl MAN page for further information.
smartmontools provides two utility programs (smartctl and smartd) to control and monitor storage systems using SMART.
It can be installed in RedHat-like systems using yum (yum install smartmontools).
To get "general" Info like device model number, serial number, firmware version... (e.g. /dev/sda):
smartctl -i /dev/sda
To get Health Status of a device - for instance for predicting its own failure within the next 24 hours (e.g. /dev/sda):
smartctl -H /dev/sda
To get SMART Attributes of a device (e.g. /dev/sda):
smartctl -A /dev/sda
To get SMART Capabilities of a device (e.g. /dev/sda):
smartctl -c /dev/sda
To get error information of a device (e.g. /dev/sda):
smartctl -l error /dev/sda
To get all those information and even more about a device (e.g. /dev/sda):
smartctl -a /dev/sda
The smartctl command allows launching some tests.
For instance to launch a short test:
smartctl -t short /dev/sda
To get progress and result information:
smartctl -l selftest /dev/sda
See smartctl MAN page for further information.
Labels:
Administration,
Gnu/Linux
Subscribe to:
Posts (Atom)
