IPMI useful commands

IPMI

yum install OpenIPMI

mkdir /root/temp/

cd /root/temp/

wget ftp://ftp.supermicro.com/utility/IPMICFG/ipmicfg_1.22.0_general_20150814.zip

unzip ipmicfg_1.22.0_general_20150814.zip

cd ipmicfg_1.22.0_general_20150814/linux/64biti/

chmod +x ipmicfg-linux.x86_64

to show IP Address:

# ./ipmicfg-linux.x86_64 -m

to show NETMASK:

# ./ipmicfg-linux.x86_64 -k

to show GATEWAY:

# ./ipmicfg-linux.x86_64 -g

 

ipmi error config:

[kcs] kcs_error:

[kcs] kcs_error_exit:

activate ipmi_devintf:

modprobe ipmi_devintf

[Total: 0   Average: 0/5]

fdisk how to create partitions

1.Create a new partition

sudo fdisk /dev/sda

This will bring up the fdisk menu, you should familiarize yourself with it, search for tutorials (here’s one). The basic options are:

Command action

a toggle a bootable flagL

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition

l list known partition types

m print this menu

n add a new partition

o create a new empty DOS partition table

p print the partition table

q quit without saving changes

s create a new empty Sun disklabel

t change a partition’s system id

u change display/entry units

v verify the partition table

w write table to disk and exit

x extra functionality (experts only)

If all goes well, by pressing N, you will be given the option of creating a new partition in the empty space. If the only unallocated space is the one you want to use, the default choices should be fine and you can just let fdisk choose.

2.Since you want to create an ext partition, you don’t need to do anything. If you wanted to create a different type (swap or NTFS or whatever) you would need to use t to change the partition type. I am mentioning this just in case.

3.Check that your changes are what you expected by hitting P to print the partition table.

4.If everything is OK, write the new partition table to the disk (W) and exit (Q).

Now that you have your new, empty partition, you can create it’s filesystem. So, if you just created /dev/sdaX (where X is the number of the partition you created, for example /dev/sda2), run this:

sudo mkfs.ext4 /dev/sdaX

[Total: 0   Average: 0/5]

Exim commands

Useful exim commands:

exim -M id      #Try to send the message with id id
exim -qf       #Tell exim to process the entire queue again
exim -qff      #same as qf, but it will flush the frozen messages
exim -Mvl id    #view the message log for message id
exim -Mvh id    #view message id‘s headers
exim -Mvb id    #view message id‘s body
exim -Mrm id    #remove message id from the queue
exim -Mg id     #fail and send a bounce to the sender
exim -bp | exiqsumm    #Print summary of the messages in the queue
exiwhat        #show what exim is doing right now
exim -bpc      #show number of messages in the queue
exim -bp       #print list of messages in the queue

exim -bP | grep message_size_limit

exiqgrep -z -i | xargs exim -Mrm // Remove all frozen messages

exiqgrep -i -f [email protected] | xargs exim -Mf // Freeze all queued mail from a given sender

exiqgrep -i -f ‘<[email protected]>’ | xargs exim -Mrm // remove all mails from user [email protected]

exim -bp | grep “[email protected]” | awk ‘{print $3}’ | xargs exim -Mrm

 

Exim_remove script to clear queue:

/root/exim_remove

Usage: /root/exim_remove [-r] [-sb <PATTERN> | -sh <PATTERN>] [-i] [-f] [-s]

-r: remove the emails from queue not just list info

-sb: search email’s body in the exim queue for PATTERN

-sh: search email’s header in the exim queue for PATTERN

-i: treat PATTERN as case insensitive

-f: search for the frozen emails in the exim queue

-s: generate mail queue stats

The manual way to remove the entire queue is as follows

cd /var/spool
mv exim exim.old
mkdir -p exim/input
mkdir -p exim/msglog
mkdir -p exim/db
chown -R mail:mail exim

[Total: 0   Average: 0/5]