If you are looking for HBA wwn on your server just to do zoning or maybe doublecheck that it matches with what you see on FC sswitch just log in to your LInux box and run following: cat /sys/class/fc_host/host*/port_name Output (amount of lines) will depend on how many ports and cards you have in…
Category: Admin tasks
kill multiple processes with awk
ps aux | grep httpd root 329 0.0 0.0 103236 856 pts/0 S+ 12:49 0:00 grep httpd root 30954 0.0 1.0 258980 10744 ? Ss 10:39 0:00 /usr/sbin/httpd apache 30956 0.0 0.6 258980 6196 ? S 10:39 0:00 /usr/sbin/httpd apache 30957 0.0 0.6 258980 6196 ? S 10:39 0:00 /usr/sbin/httpd apache 30958 0.0 0.6 258980 …
Centos 6/RedHat 6 network cards MAC adress
With CentOS 6 everthing is handled by udev now. Go into /etc/udev/rules.d and delete the 70-persistent-net.rules file and reboot. If you open it berfore hand you will most likey see the original NIC MAC listed as eth0 and the new one as eth1. Deleting the file forces the detection process to run again at boot with no…
Red Hat Linux – Can not find the Gnome enviroment.
Installed nxserver and trying to connect with nxclient. Error message: Install following: “X Window System” Mandatory Packages: yum install bitmap-fonts desktop-backgrounds-basic xorg-x11-drivers xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-Type1 xorg-x11-fonts-misc xorg-x11-fonts-truetype xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-xfs xorg-x11-xinit “GNOME Desktop Environment” Mandatory Packages: yum install control-center gnome-applets gnome-panel gnome-session gnome-terminal metacity nautilus yelp Also follwing might also be required: bitmap-fonts…
Redirect output and errors to /dev/null
my.command > /dev/null 2>&1 my.script.sh > /dev/null 2>&1
Find 10 biggest files, sort by file size.
find / -type f -print0 | xargs -0 du -h | sort -hr | head -10
How to identify heavy write to disk?
Info is from here You can easily see what process is consuming the most I/O bandwidth: dstat -ta –top-bio dstat -ta –top-io The first being the top block I/O, and the second the top I/O (including cached). This may help you validate if this is what you expect (both as consumer as well as the…
/usr/bin/sw-engine: /etc/mail/spamassassin/cmae/cloudmark/lib/libstdc++.so.6: version `CXXABI_1.3.1′ not found (required by /usr/bin/sw-engine)
[root@localhost ~]# /usr/local/psa/bin/admin –show-password /usr/bin/sw-engine: /etc/mail/spamassassin/cmae/cloudmark/lib/libstdc++.so.6: version `CXXABI_1.3.1′ not found (required by /usr/bin/sw-engine) Solution: cd /etc/mail/spamassassin/cmae/cloudmark/syslib/ mv libstdc++.so.6 libstdc++.so.6.old cp /usr/lib64/libstdc++.so.6 libstdc++.so.6 /usr/local/psa/bin/admin –show-password # – works fine now
Linux commands
Command Description • apropos whatis Show commands pertinent to string. See also threadsafe • man -t man | ps2pdf – > man.pdf make a pdf of a manual page which command Show full path name of command time command See how long a command takes • time cat Start stopwatch. Ctrl-d to stop. See…
Lists all the RPMs installed in a system sorted by package size
rpm -qa –queryformat=’%{SIZE} %{NAME} \n’ | sort -nr