Feeds:
Posts
Comments

Archive for the ‘GNU/Linux’ Category

# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array 5i Controller
Board ID: 0x40800e11
Firmware Version: 2.66
IRQ: 10
Logical drives: 3
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 128
Max # commands on controller since init: 128
Max SG entries since init: 31

Sequential access devices: 0

cciss/c0d0:       69.45GB       RAID 1(0+1)
cciss/c0d1:       69.45GB       RAID 1(0+1)
cciss/c0d2:       69.45GB       RAID 1(0+1)

 

Download

HP Array Configuration Utility for Linux

Hp Array Configuration Utility CLI for Linux

HP Array Diagnostics Utility for Linux

HP System management HomePage for Linux (x86)

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=3291842&prodTypeId=15351&prodSeriesId=396616&swLang=8&taskId=135&swEnvOID=1097#7832

 

Install the System management Homepage

# rpm -ivh hpsmh-< version >.linux.i386.rpm

To run HPSMH

#/etc/init.d/hpsmhd start

 

Install HP Array Configuration Utility for Linux

# rpm -ivh cpqacuxe-8.25-5.noarch.rpm

The software resides in /usr/lib, /opt/compaq/cpqacuxe and the executable name is cpqacuxe which is located in /usr/sbin.

The password resetting utility is hphmmopasswd that is located in /opt/compaq/cpqacuxe/bld.

 

Running the Array Configuration Utility

Use “cpqacuxe” for the local access only or

“cpqacuxe -R” for remote access

 

Type "http://SERVERNAME:2301" into the url field. The servername should 
be the IP address or server name of the host on which the ACU server
is running.
Use root Username and Password for login

Supported Controllers

  Smart Array 5312 Controller
  Smart Array 5302 Controller
  Smart Array 5304 Controller
  Smart Array 532 Controller
  Smart Array 5i Controller
  Integrated Smart Array Controller
  Smart Array 4200 Controller
  Smart Array 4250ES Controller
  Smart Array 431 Controller
  Smart Array 3200 Controller
  MSA500 Controller
  MSA1000 Controller
  Smart Array 641 Controller
  Smart Array 642 Controller
  Smart Array 6400 Controller
  Smart Array 6400 EM Controller
  Smart Array 6i Controller
  MSA500 G2 Controller
  MSA1500 CS Controller
  MSA20 Controller
  Smart Array P600 Controller
  Smart Array P400 Controller
  Smart Array P400i Controller
  Smart Array E200 Controller
  Smart Array E200i Controller
  Smart Array P800 Controller
  Smart Array E500 Controller

Read Full Post »

Just happened on couple of SLES 9 servers after installing the followings 
the server just came back with postfix plugin.

perl-Net-Server-0.87-29.4.i586.rpm
munin-node-1.2.4-1.sles9.rpm

 
But by default munin plugins are
cpu entropy forks if_eth0 iostat memory mysql_slowqueries  open_files processes df exim_mailqueue
if_err_eth0  if_eth1 irqstats mysql_bytes mysql_threads open_inodes
swap df_inode  exim_mailstats if_err_eth1 interrupts load mysql_queries 
netstat postfix_mailvolume vmstat

Then I manually did symbolic links from /etc/munin/plugins to /usr/share/munin/plugins

beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/cpu cpu
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/df df
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/df_inode df_inode
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/load load
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/memory memory
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/processes processes
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/if_eth0 if_eth0
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/if_err_eth0 if_err_eth0
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/if_eth1 if_eth1
beastie:/etc/munin/plugins # ln -s /usr/share/munin/plugins/if_err_eth1 if_err_eth1

Now after this the munin-node crashed and failed to show graph even for postfix.

While checking the log for munin in /var/log/munin/munin-node.log, I got the following error message

Can’t exec “/etc/munin/plugins/df”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:09:52 Plugin timeout: df config: Interrupted system call
(pid 16888)
2008/08/07-18:09:52 Server closing!
Can’t exec “/etc/munin/plugins/cpu”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:02 Plugin timeout: cpu config: Interrupted system call
(pid 16894)
2008/08/07-18:10:02 Server closing!
Can’t exec “/etc/munin/plugins/load”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:12 Plugin timeout: load config: Interrupted system call
(pid 16901)
2008/08/07-18:10:12 Server closing!
Can’t exec “/etc/munin/plugins/swap”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:22 Plugin timeout: swap config: Interrupted system call
(pid 16908)
2008/08/07-18:10:22 Server closing!
Can’t exec “/etc/munin/plugins/forks”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:32 Plugin timeout: forks config: Interrupted system call
(pid 16911)
2008/08/07-18:10:32 Server closing!
Can’t exec “/etc/munin/plugins/entropy”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:42 Plugin timeout: entropy config: Interrupted system call
(pid 16912)
2008/08/07-18:10:42 Server closing!
Can’t exec “/etc/munin/plugins/netstat”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:10:52 Plugin timeout: netstat config: Interrupted system call
(pid 16917)
2008/08/07-18:10:52 Server closing!
Can’t exec “/etc/munin/plugins/iostat”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:11:02 Plugin timeout: iostat config: Interrupted system call
(pid 16986)
Can’t exec “/etc/munin/plugins/df_inode”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:11:14 Plugin timeout: df_inode config: Interrupted system call
(pid 16991)
2008/08/07-18:11:14 Server closing!
Can’t exec “/etc/munin/plugins/memory”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:11:24 Plugin timeout: memory config: Interrupted system call
(pid 16997)
2008/08/07-18:11:24 Server closing!
Can’t exec “/etc/munin/plugins/vmstat”: Permission denied at /usr/sbin/munin-node line 562.
2008/08/07-18:11:34 Plugin timeout: vmstat config: Interrupted system call
(pid 17014)
2008/08/07-18:11:34 Server closing!
2008/08/07-18:14:33 CONNECT TCP Peer: “XX.XX.XX.7:52286” Local: “XX.XX.XX.145:4949”
Can’t exec “/etc/munin/plugins/df_inode”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 2.
Can’t exec “/etc/munin/plugins/entropy”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 3.
Can’t exec “/etc/munin/plugins/cpu”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 4.
Can’t exec “/etc/munin/plugins/postfix_mailvolume”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 5.
Can’t exec “/etc/munin/plugins/postfix_mailqueue”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 6.
Can’t exec “/etc/munin/plugins/forks”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 7.
Can’t exec “/etc/munin/plugins/iostat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 8.
Can’t exec “/etc/munin/plugins/memory”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 9.
Can’t exec “/etc/munin/plugins/df”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 10.
Can’t exec “/etc/munin/plugins/netstat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 11.
Can’t exec “/etc/munin/plugins/swap”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 12.
Can’t exec “/etc/munin/plugins/vmstat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 13.
Can’t exec “/etc/munin/plugins/load”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 14.
Can’t exec “/etc/munin/plugins/cpu”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 15.
Can’t exec “/etc/munin/plugins/entropy”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 16.
Can’t exec “/etc/munin/plugins/df_inode”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 17.
Can’t exec “/etc/munin/plugins/postfix_mailqueue”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 18.
Can’t exec “/etc/munin/plugins/postfix_mailvolume”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 19.
Can’t exec “/etc/munin/plugins/forks”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 20.
Can’t exec “/etc/munin/plugins/iostat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 21.
Can’t exec “/etc/munin/plugins/memory”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 22.
Can’t exec “/etc/munin/plugins/df”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 23.
Can’t exec “/etc/munin/plugins/netstat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 24.
Can’t exec “/etc/munin/plugins/swap”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 25.
Can’t exec “/etc/munin/plugins/vmstat”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 26.
Can’t exec “/etc/munin/plugins/load”: Permission denied at /usr/sbin/munin-node line 562, <STDIN> line 27.
2008/08/07-18:14:33 Plugin “swap” exited with status 13. —-
2008/08/07-18:14:33 Plugin “netstat” exited with status 13. —-
2008/08/07-18:14:33 Plugin “df” exited with status 13. —-
2008/08/07-18:14:33 Plugin “memory” exited with status 13. —-
2008/08/07-18:14:33 Plugin “iostat” exited with status 13. —-
2008/08/07-18:14:33 Plugin “forks” exited with status 13. —-
2008/08/07-18:14:33 Plugin “postfix_mailvolume” exited with status 13. —-
2008/08/07-18:14:33 Plugin “postfix_mailqueue” exited with status 13. —-
2008/08/07-18:14:33 Plugin “df_inode” exited with status 13. —-
2008/08/07-18:14:33 Plugin “entropy” exited with status 13. —-
2008/08/07-18:14:33 Plugin “cpu” exited with status 13. —-
2008/08/07-18:14:33 Plugin “load” exited with status 13. —-
2008/08/07-18:14:33 Plugin “vmstat” exited with status 13. —-
2008/08/07-18:14:33 Plugin “swap” exited with status 13. —-
2008/08/07-18:14:33 Plugin “netstat” exited with status 13. —-
2008/08/07-18:14:33 Plugin “df” exited with status 13. —-
2008/08/07-18:14:33 Plugin “memory” exited with status 13. —-
2008/08/07-18:14:33 Plugin “iostat” exited with status 13. –
2008/08/07-18:14:33 Plugin “forks” exited with status 13. —-
2008/08/07-18:14:33 Plugin “postfix_mailqueue” exited with status 13. —-
2008/08/07-18:14:33 Plugin “postfix_mailvolume” exited with status 13. —-
2008/08/07-18:14:33 Plugin “cpu” exited with status 13. —-
2008/08/07-18:14:33 Plugin “entropy” exited with status 13. —-
2008/08/07-18:14:33 Plugin “df_inode” exited with status 13. —-

 

If you ever get these kinds of errors don’t forget to add plugins and permissions in /etc/munin/plugin-conf.d/munin-node file.

$cat /etc/munin/plugin-conf.d/munin-node
#
# This file contains configuration options for the plugins. Three
# options are understood by munin-node itself:
#
#       user <user>         # Set the user to run the plugin as
#       group <group>       # Set the group to run the plugin as
#       command <command>   # Run <command> instead of the plugin. %c
#                             expands to what would normally be run.
#   env.<variable>      # Sets <variable> in the plugin’s environment, see the
#                         individual plugins to find out which variables they
#                         care about.
#
#

[mysql*]
#env.mysqlopts -u someuser

[exim*]
group mail

[cps*]
user root

[apt]
user root

[vlan*]
user root

[postfix*]
user root
env.logfile mail

[cpu*]
user root

[memory*]
user root

[load*]
user root

[if_*]
user root

[if_err_*]
user root

[df*]
user root

[process*]
user root

[dhcpd]
env.leasefile /var/lib/dhcp/db/dhcpd.leases

 

You have to do this only when you get those error messages 🙂 Cheers

Read Full Post »

daemontools is a collection of tools for managing UNIX services.

supervise monitors a service. It starts the service and restarts the service if it dies. Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service.

multilog saves error messages to one or more logs. It optionally timestamps each line and, for each log, includes or excludes lines matching specified patterns. It automatically rotates logs to limit the amount of disk space used. If the disk fills up, it pauses and tries again, without losing any data.

 

Click the link for more

http://cr.yp.to/daemontools.html

Read Full Post »

Linux rlimit problem

On Linux, we have started experiencing the following problem:

Jun 11 14:07:52 10.1.123.234 kernel: open files rlimit 1024 reached for uid 0 pid 7127 (seen 2 times)

The following seems to fix the problem after a reboot:

Modify /etc/init.d/cron and add the line in red.

case “$1” in
    start)
ulimit -n 65536
        echo -n “Starting CRON daemon”
        ## Start daemon with star

Create /etc/initscript with the following:

# Increase the hard filedescriptor limit for all processes
# to 65536.  The soft limit is still 1024, but any unpriviliged
# process can increase it’s soft limit up to the hardlimit
# with “ulimit -Sn xxx” (needs a 2.2.13 or later Linux kernel).
ulimit -Hn 65536

# Execute the program.
eval exec “$4”

Read Full Post »

Just Steps

1.  Boot from SUSE Linux Install CD
2.  Select Rescue Mode
3.  Login as “root” to rescue mode (no password)
4.  Manually mount your non-LVM disks   
    a.  mkdir /mnt/root
    b.  mount /dev/sda1 /mnt/root/boot

5.  Manually mount your LVM stuff:
    b.  vgscan
    c.  vgchange -a -y rootvg
    d.  mount /dev/rootvg/lvroot /mnt/root/boot
    d.  mount /dev/rootvg/lvusr /mnt/root/boot/usr
    d.  mount /dev/rootvg/lvopt /mnt/root/boot/opt
    d.  mount /dev/rootvg/lvhome /mnt/root/boot/home
    d.  mount /dev/rootvg/lvvar /mnt/root/boot/var

** You can now update your configuration to recover your system from what 
   ever you did to get to this point..

Read Full Post »

Found this article,

Don’t have idea who’s the author

1.  Introduction

    It’s important to determine how your system utilizes it’s
    resources. If your systems performance is unacceptable, it is
    necessary to determine which resource is slowing the system
    down. This document attempts to identify the following:

    a.  What is the system memory usage per unit time?
    b.  How much swap is being used per unit time?
    c.  What does each process’ memory use look like over time?
    d.  What processes are using the most memory?

2.  Definitions

    RAM (Random Access Memory) – Location where programs reside when
    they are running. Other names for this are system memory or
    physical memory. The purpose of this document is to determine if
    you have enough of this.

    Memory Buffers – A page cache for the virtual memory system. The
    kernel keeps track of frequently accessed memory and stores the
    pages here.

    Memory Cached – Any modern operating system will cache files
    frequently accessed. You can see the effects of this with the
    following commands:

        for i in 1 2 ; do
            free -o
            time grep -r foo /usr/bin >/dev/null 2>/dev/null
        done

    Memory Used – Amount of RAM in use by the computer. The kernel
    will attempt to use as much of this as possible through buffers
    and caching.

    Swap – It is possible to extend the memory space of the computer
    by using the hard drive as memory. This is called swap. Hard
    drives are typically several orders of magnitude slower than RAM
    so swap is only used when no RAM is available.

    Swap Used – Amount of swap space used by the computer.

    PID (Process IDentifier) – Each process (or instance of a running
    program) has a unique number. This number is called a PID.

    PPID (Parent Process IDentifier) – A process (or running program)
    can create new processes. The new process created is called a
    child process. The original process is called the parent
    process. The child process has a PPID equal to the PID of the
    parent process. There are two exceptions to this rule. The first
    is a program called “init”. This process always has a PID of 1 and
    a PPID of 0. The second exception is when a parent process exit
    all of the child processes are adopted by the “init” process and
    have a PPID of 1.

    VSIZE (Virtual memory SIZE) – The amount of memory the process is
    currently using. This includes the amount in RAM and the amount in
    swap.

    RSS (Resident Set Size) – The portion of a process that exists in
    physical memory (RAM). The rest of the program exists in swap. If
    the computer has not used swap, this number will be equal to
    VSIZE.

3.  What consumes System Memory?

    The kernel – The kernel will consume a couple of MB of memory. The
    memory that the kernel consumes can not be swapped out to
    disk. This memory is not reported by commands such as “free” or
    “ps”.

    Running programs – Programs that have been executed will consume
    memory while they run.

    Memory Buffers – The amount of memory used is managed by the
    kernel. You can get the amount with “free”.

    Memory Cached – The amount of memory used is managed by the
    kernel. You can get the amount with “free”.

4.  Determining System Memory Usage

    The inputs to this section were obtained with the command:

        free -o

    The command “free” is a c program that reads the “/proc”
    filesystem.

    There are three elements that are useful when determining the
    system memory usage. They are:

    a.  Memory Used
    b.  Memory Used – Memory Buffers – Memory Cached
    c.  Swap Used

    A graph of “Memory Used” per unit time will show the “Memory Used”
    asymptotically approach the total amount of memory in the system
    under heavy use. This is normal, as RAM unused is RAM wasted.

    A graph of “Memory Used – Memory Buffered – Memory Cached” per
    unit time will give a good sense of the memory use of your
    applications minus the effects of your operating system. As you
    start new applications, this value should go up. As you quit
    applications, this value should go down. If an application has a
    severe memory leak, this line will have a positive slope.

    A graph of “Swap Used” per unit time will display the swap
    usage. When the system is low on RAM, a program called kswapd will
    swap parts of process if they haven’t been used for some time. If
    the amount of swap continues to climb at a steady rate, you may
    have a memory leak or you might need more RAM.

5.  Per Process Memory Usage

    The inputs to this section were obtained with the command:

        ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww –sort=pid

    The command “ps” is a c program that reads the “/proc”
    filesystem.

    There are two elements that are useful when determining the per
    process memory usage. They are:

    a.  RSS
    b.  VSIZE

    A graph of RSS per unit time will show how much RAM the process is
    using over time.

    A graph of VSIZE per unit time will show how large the process is
    over time.

6.  Collecting Data

    a.  Reboot the system. This will reset your systems memory use

    b.  Run the following commands every ten seconds and redirect the
        results to a file.

        free -o
        ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww –sort=pid

    c.  Do whatever you normally do on your system

    d.  Stop logging your data

7.  Generate a Graph

    a.  System Memory Use

        For the output of “free”, place the following on one graph

        1.  X-axis is “MB Used”

        2.  Y-axis is unit time

        3.  Memory Used per unit time

        4.  Memory Used – Memory Buffered – Memory Cached per unit time

        5.  Swap Used per unit time

    b.  Per Process Memory Use

        For the output of “ps”, place the following on one graph

        1.  X-axis is “MB Used”

        2.  Y-axis is unit time

        3.  For each process with %MEM > 10.0

            a.  RSS per unit time

            b.  VSIZE per unit time

8. Understand the Graphs

    a.  System Memory Use

        “Memory Used” will approach “Memory Total”

        If “Memory Used – Memory Buffered – Memory Cached” is 75% of
        “Memory Used”, you either have a memory leak or you need to
        purchase more memory.

    b.  Per Process Memory Use

        This graph will tell you what processes are hogging the
        memory.

        If the VSIZE of any of these programs has a constant, positive
        slope, it may have a memory leak.

Read Full Post »

Checking Memory usage in Linux

 

To determine the size and usage of memory , you can use the following command:

# cat /proc/meminfo
MemTotal:     10385196 kB
MemFree:        356152 kB
Buffers:        277728 kB
Cached:        8946964 kB
SwapCached:      65344 kB
Active:        1154428 kB
Inactive:      8468688 kB
HighTotal:     9567656 kB
HighFree:        55924 kB
LowTotal:       817540 kB
LowFree:        300228 kB
SwapTotal:     4200988 kB
SwapFree:      4089040 kB
Dirty:             936 kB
Writeback:           0 kB
Mapped:         975168 kB
Slab:           180596 kB
Committed_AS:  3671976 kB
PageTables:     183048 kB
VmallocTotal:   112632 kB
VmallocUsed:     29348 kB
VmallocChunk:    82980 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     2048 kB

Alternatively, use #free

# free
                total            used           free     shared    buffers     cached
Mem:      10385196   10047660     337536          0     278988    8947760
-/+ buffers/cache:     820912    9564284
Swap:      4200988     111948    4089040

How to read memory usage?

In the example the total amount of available memory is 10385196KB. 820912KB are used by processes and

9564284KB are free for other applications. Looking at the first line (free 337536 ) don’t get confused. If you look at the usage figures you can see that most of the memory use is for buffers and cache as Linux always tries to use RAM to the fullest extent to speed up disk operations.Using available memory for buffers (file system metadata) and cache (pages with actual contents of files or block devices) helps the system to run faster because disk information is already in memory which saves I/O.

Read Full Post »

Older Posts »