Just a quick note. To quiet an alarm on a controller just run the following command:
# omconfig storage controller action=quietalarm controller=<controller id>
Use this command to disable alarms all together:
# omconfig storage controller action=disablealarm controller=<controller id>
The error “Fatal error: Can’t open and lock privilege tables: Table ‘mysql.servers’ doesn’t exist” is caused by some incomplete privilege tables. Please run the following command at a command prompt:
# cd "Program FilesMySQLMySQL Server 5.2scripts\"
# mysql --force -uroot -p mysql < mysql_fix_privilege_tables.sql
This did the trick for me – not too sure why this wasn’t part of the install but all is well now.
Most of us are familiar with RPM packages and how to install them. Sometimes it can be useful to extract the files without installing them into the RPM database. We use CPIO (a utility to copy files to and from archives) and a tool called rpm2cpio.
- Download/obtain the RPM you wish to extract.
- Make a temporary directory for your RPM extraction.
- Run the following command:
rpm2cpio wget-1.9.1-22.i386.rpm | cpio -idmv
- Your files are now extracted (with directory structure) in your temporary directory. The cpio flags are as follows:
i – restore archive
d – create any leading directories if needed
m – retain file modification times
v – verbose mode (display progress and folder structure)
Here’s what we see on the screen when performing the above operations:
While working with Linux many of us have noticed the Linux "Load Average" but never really put much thought into how this number is generated. Load averages are generated using many different metrics, disk load, CPU usage, memory usage and much more. The load average number is the total number of processes waiting in the run queue.
Using "top" provides insight into the system’s general health status.
The top command provides a view of the following main health statistics:
- Uptime (including days, hours and minutes, the user count and current time and load average)
- The total number of processes along with the number of running processes and sleeping processes
- Memory usage including total memory, used and free memory
- Swap memory usage (useful for troubleshooting slow systems)
The top command looks like this:
The topmost process on the top process list is the process using the highest percentage of CPU. The top command is available on most Unix and Linux variants.
As we’ll learn, CPU usage is not directly related to load average. Load average is an overall view of the system.
The load average rule of thumb
One quick rule of thumb I try to use (to make sure systems do not see any latency … e.g. slow processes, slow page loads, slow queries etc…) is to keep the number of waiting processes in the run queue (the load average represents total number of processes that had to wait for resources in the last 1, 5 and 15 minutes) under the total number of processors in the machine.
To check the number of processors (recognized by the Unix/Linux OS) run the following command:
cat /proc/cpuinfo | grep "processor" | wc -l
Keep in mind this command will return the total number of recognized processors. If you have a hyper-threaded P4 you’ll see two processors when really you only have one core. The same rule applies with the load average rule of thumb.
Keeping the load average under the total processor count will make for a happy, healthy and fast-responding system.
Strange enough I found a server today which had permissions set incorrectly for “/dev/null”
Here’s a fix:
ls -l /dev/null
You should see this if everything is correctly
crw-rw-rw- 1 root root 1, 3
If you get a different set of permissions like
-rw-r–r– 1 root root 1, 3
then you should (as root) delete the /dev/null with:
and recreate it (as root) again with:
mknod -m 0666 /dev/null c 1 3