<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5521735836171938846</id><updated>2026-09-20T06:40:03.086-05:00</updated><category term="centos"/><category term="fedora"/><category term="Red Hat"/><category term="rhel"/><category term="dell"/><category term="linux"/><category term="check_mk"/><category term="nagios"/><category term="rocks cluster"/><category term="Windows 7"/><category term="centos5"/><category term="centos6"/><category term="nvidia"/><category term="RHEL6"/><category term="check_openmanage"/><category term="esxi"/><category term="omd"/><category term="puppet"/><category term="ruby"/><category term="ubuntu"/><category term="vmware"/><category term="RHEL 6"/><category term="bash"/><category term="esx"/><category term="fedora 11"/><category term="fedora 16"/><category term="fedora 17"/><category term="fedora 9"/><category term="git"/><category term="gnome 3"/><category term="google"/><category term="hardy heron"/><category term="infiniband"/><category term="iphone 3.0 3 3.1"/><category term="iterate"/><category term="kickstart"/><category term="loop"/><category term="nouveau"/><category term="ofed"/><category term="poweredge"/><category term="rhel5"/><category term="shell"/><category term="spacewalk"/><category term="sun grid engine"/><category term="yum"/><category term="3g"/><category term="4.0"/><category term="4.1"/><category term="5.9"/><category term="524520"/><category term="6.2"/><category term="62u4"/><category term="62u5"/><category term="B43"/><category term="BCM43"/><category term="Broadcom"/><category term="Enterprise Linux"/><category term="OME"/><category term="OSX"/><category term="Open Manage Essentials"/><category term="OpenManage Essentials"/><category term="ThreadTools.h"/><category term="VMware Workstation"/><category term="anaconda"/><category term="ati"/><category term="backup"/><category term="batch"/><category term="boot"/><category term="bright computing"/><category term="brightcm"/><category term="btrfs"/><category term="calc"/><category term="centos 6"/><category term="centos 7"/><category term="centos6.5"/><category term="centos7"/><category term="cerebro"/><category term="certificate"/><category term="certificate authority"/><category term="cfengine"/><category term="check_dell_bladechassis"/><category term="chrome"/><category term="chromium"/><category term="cmsh"/><category term="command"/><category term="crt"/><category term="cryptsetup"/><category term="csr"/><category term="dconf-editor"/><category term="diff"/><category term="dsu"/><category term="e2fsck"/><category term="el5"/><category term="el6"/><category term="el6.5"/><category term="el7"/><category term="ethtool"/><category term="ext4"/><category term="extra_service_conf"/><category term="facter"/><category term="fedora 12"/><category term="fedora 15"/><category term="fedora 8"/><category term="fglrx"/><category term="firewall builder"/><category term="for"/><category term="foreman"/><category term="fs-snapshot"/><category term="fsck"/><category term="fwbuilder"/><category term="g++"/><category term="gcc"/><category term="gconftool"/><category term="geany"/><category term="gedit"/><category term="geforce 8400M GS"/><category term="gfortran"/><category term="gnome"/><category term="gnome shell"/><category term="gnome terminal"/><category term="gnu"/><category term="gpfs"/><category term="greeter"/><category term="grid engine"/><category term="gridscaler"/><category term="gromacs"/><category term="grub"/><category term="grub2"/><category term="hardlink"/><category term="iDRAC"/><category term="ibm"/><category term="icc"/><category term="intel"/><category term="ios 4"/><category term="iphone"/><category term="iphone 3g"/><category term="key"/><category term="leonidas"/><category term="link"/><category term="lmt"/><category term="login"/><category term="luks"/><category term="lustre"/><category term="lustre monitoring tool"/><category term="lvextend"/><category term="macbook"/><category term="md1000"/><category term="mdadm"/><category term="mplayer"/><category term="nexus 7"/><category term="nfs"/><category term="nfsv4"/><category term="omsa"/><category term="open manage"/><category term="open manage server administrator"/><category term="open monitor distribution"/><category term="openmanage"/><category term="openmpi"/><category term="openssl"/><category term="oracle"/><category term="patch"/><category term="pem"/><category term="perl"/><category term="procedure entry point sqlite3_file_control could not be located"/><category term="pvresize"/><category term="quadro"/><category term="r630"/><category term="r730xd"/><category term="racadm"/><category term="raid"/><category term="resize2fs"/><category term="rhel 7"/><category term="rhel7"/><category term="rpm"/><category term="rpmbuild"/><category term="rsync"/><category term="script"/><category term="selinux"/><category term="sge"/><category term="shutdown"/><category term="slow"/><category term="snapshot"/><category term="softlink"/><category term="spec"/><category term="spectrum scale"/><category term="sql express"/><category term="srvadmin"/><category term="ssize_t"/><category term="ssl"/><category term="subversion"/><category term="svn"/><category term="textwrangler"/><category term="trac"/><category term="unable to load provider data"/><category term="upgrade"/><category term="vcenter"/><category term="vi"/><category term="virtual center server"/><category term="vmlinuz"/><category term="vmotion"/><category term="vmware esxi"/><category term="vmware esxi dell customization"/><category term="vmware player"/><category term="vmware server"/><category term="vsphere"/><category term="wato"/><category term="wifi"/><category term="windows"/><category term="winrm"/><category term="ws2308 weather station wu-upload"/><category term="xCAT"/><title type='text'>FlakRat&#39;s Rat House</title><subtitle type='html'>Blogging about Linux, VMware, KVM, Rocks Clusters, HPC, Red Hat, Fedora, Ubuntu and other tech stuff that interests me</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>71</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-6174618766340782511</id><published>2016-12-01T22:22:00.000-06:00</published><updated>2016-12-01T22:22:18.462-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gpfs"/><category scheme="http://www.blogger.com/atom/ns#" term="gridscaler"/><category scheme="http://www.blogger.com/atom/ns#" term="spectrum scale"/><title type='text'>HowTo: Restore a GridScaler GPFS Client Node after Reinstalling the Node</title><content type='html'>I ran into this issue after reinstalling several compute nodes on our cluster shortly after bringing our new DDN GridScaler GPFS storage cluster online.
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ sudo mmstartup -N c0040
Fri Dec  2 03:36:03 UTC 2016: mmstartup: Starting GPFS ...
c0040:  mmremote: determineMode: Missing file /var/mmfs/gen/mmsdrfs.
c0040:  mmremote: This node does not belong to a GPFS cluster.
mmstartup: Command failed. Examine previous error messages to determine cause.&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
One method I discovered online was to take the affected node off of the network (or reboot it), remove it from the GPFS cluster, once it&#39;s back on the network (or fully rebooted), add it back, license it and start it.
&lt;br /&gt;&lt;br /&gt;
Later I was introduced to the &lt;b&gt;mmsdrrestore&lt;/b&gt; command (portion of the man file below:
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;mmsdrrestore command

Restores the latest GPFS system files on the specified nodes.

Synopsis

mmsdrrestore [-p NodeName] [-F mmsdrfsFile] [-R remoteFileCopyCommand]
             [-a | -N {Node[,Node...] | NodeFile | NodeClass}]

Availability

Available on all IBM Spectrum Scale editions.

Description

The mmsdrrestore command is intended for use by experienced
system administrators.

Use the mmsdrrestore command to restore the latest GPFS
system files on the specified nodes. If no nodes are specified,
the command restores the configuration information only on the
node on which is it run. If the local GPFS configuration file is
missing, the file that is specified with the -F option from
the node that is specified with the -p option is used
instead. This command works best when used with the
mmsdrbackup user exit. See the following IBM Spectrum
Scale: Administration and Programming Reference topic:
mmsdrbackup user exit.

...
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Here&#39;s an example of using the command to restore the configuration to node c0040 using primary server gs0 (i.e.  one of the NSD servers)
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ sudo mmsdrrestore -p gs0 -N c0040
Fri Dec  2 03:47:06 UTC 2016: mmsdrrestore: Processing node gs0
Fri Dec  2 03:47:08 UTC 2016: mmsdrrestore: Processing node c0040
mmsdrrestore: Command successfully completed
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Finally, start GPFS on the client (which also mounts the file system(s) if configured to do so
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ sudo mmstartup -N c0040
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/6174618766340782511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/6174618766340782511' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6174618766340782511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6174618766340782511'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2016/12/howto-restore-gridscaler-gpfs-client.html' title='HowTo: Restore a GridScaler GPFS Client Node after Reinstalling the Node'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-705438964411517706</id><published>2016-08-22T21:44:00.010-05:00</published><updated>2016-08-22T22:31:13.263-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="centos 7"/><category scheme="http://www.blogger.com/atom/ns#" term="centos7"/><category scheme="http://www.blogger.com/atom/ns#" term="dell"/><category scheme="http://www.blogger.com/atom/ns#" term="dsu"/><category scheme="http://www.blogger.com/atom/ns#" term="el7"/><category scheme="http://www.blogger.com/atom/ns#" term="omsa"/><category scheme="http://www.blogger.com/atom/ns#" term="open manage"/><category scheme="http://www.blogger.com/atom/ns#" term="open manage server administrator"/><category scheme="http://www.blogger.com/atom/ns#" term="poweredge"/><category scheme="http://www.blogger.com/atom/ns#" term="r730xd"/><category scheme="http://www.blogger.com/atom/ns#" term="rhel 7"/><category scheme="http://www.blogger.com/atom/ns#" term="rhel7"/><category scheme="http://www.blogger.com/atom/ns#" term="srvadmin"/><title type='text'>Dell OMSA 8.3 on CentOS 7.2 &quot;Error! Chassis info setting unavailable on this system.&quot;</title><content type='html'>After installing Dell OMSA 8.3 on a new PowerEdge 730xd running CentOS 7.2 x86_64, the omreport chassis info command reports the following (after starting the services):
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# omreport chassis info

Error! Chassis info setting unavailable on this system.
&lt;/code&gt;&lt;/pre&gt;
First, the solution (Zurd on the mailing list pointed me here: &lt;a href=&quot;http://lists.us.dell.com/pipermail/linux-poweredge/2016-August/050692.html&quot;&gt;http://lists.us.dell.com/pipermail/linux-poweredge/2016-August/050692.html&lt;/a&gt;) followed by the full ticket I sent to the Dell linux-poweredge mailing list.

&lt;br /&gt;
&lt;br /&gt;
The solution for CentOS users (and possibly other non-supported distros) is to stop the services, make the following change, then restart the services&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;--- /opt/dell/srvadmin/etc/srvadmin-storage/stsvc.ini.orig 2016-08-22 21:28:32.079580254 -0500
+++ /opt/dell/srvadmin/etc/srvadmin-storage/stsvc.ini 2016-08-22 21:20:32.374317823 -0500
@@ -116,7 +116,7 @@
 vil4=dsm_sm_sasvil
 vil5=dsm_sm_sasenclvil
 vil6=dsm_sm_swrvil
-vil7=dsm_sm_psrvil
+; vil7=dsm_sm_psrvil
 vil8=dsm_sm_rnavil

 [SSDSmartInterval]&lt;/code&gt;&lt;/pre&gt;
Now on to the full details of the issue:
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Install Dell OMSA 8.3&lt;/li&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# wget -q -O - http://linux.dell.com/repo/hardware/dsu/bootstrap.cgi | bash
# yum clean all
# yum -y install kernel-devel kernel-headers gcc dell-system-update
# yum -y install srvadmin-all&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Next check the status of the services (not started)
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# srvadmin-services.sh status
dell_rbu (module) is stopped
ipmi driver is running
dsm_sa_datamgrd is stopped
dsm_sa_eventmgrd is stopped
dsm_sa_snmpd is stopped
● dsm_om_shrsvc.service - LSB: DSM OM Shared Services
   Loaded: loaded (/etc/rc.d/init.d/dsm_om_shrsvc)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
 
Aug 22 20:43:08 r730xd-srv01.local systemd[1]: Starting LSB: DSM OM Shared Services...
Aug 22 20:43:08 r730xd-srv01.local dsm_om_shrsvc[5144]: [47B blob data]
Aug 22 20:43:08 r730xd-srv01.local systemd[1]: Started LSB: DSM OM Shared Services.
Aug 22 20:43:08 r730xd-srv01.local dsm_om_shrsvc[5144]: tput: No value for $TERM and no -T specified
Aug 22 20:45:55 r730xd-srv01.local systemd[1]: Stopping LSB: DSM OM Shared Services...
Aug 22 20:45:55 r730xd-srv01.local dsm_om_shrsvc[8804]: [52B blob data]
Aug 22 20:45:55 r730xd-srv01.local systemd[1]: Stopped LSB: DSM OM Shared Services.
Aug 22 20:46:28 r730xd-srv01.local systemd[1]: Stopped LSB: DSM OM Shared Services.
● dsm_om_connsvc.service - LSB: DSM OM Connection Service
   Loaded: loaded (/etc/rc.d/init.d/dsm_om_connsvc)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
 
Aug 22 20:43:08 r730xd-srv01.local systemd[1]: Starting LSB: DSM OM Connection Service...
Aug 22 20:43:08 r730xd-srv01.local dsm_om_connsvc[5145]: [50B blob data]
Aug 22 20:43:08 r730xd-srv01.local systemd[1]: Started LSB: DSM OM Connection Service.
Aug 22 20:45:55 r730xd-srv01.local systemd[1]: Stopping LSB: DSM OM Connection Service...
Aug 22 20:46:02 r730xd-srv01.local dsm_om_connsvc[8844]: [55B blob data]
Aug 22 20:46:02 r730xd-srv01.local systemd[1]: Stopped LSB: DSM OM Connection Service.
Aug 22 20:46:29 r730xd-srv01.local systemd[1]: Stopped LSB: DSM OM Connection Service.&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Start the services
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# srvadmin-services.sh start
Starting instsvcdrv (via systemctl):                       [  OK  ]
Starting dataeng (via systemctl):                          [  OK  ]
Starting dsm_om_shrsvc (via systemctl):                    [  OK  ]
Starting dsm_om_connsvc (via systemctl):                   [  OK  ]&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Try running the chassis info command
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# omreport chassis info
Error! Chassis info setting unavailable on this system.
 
# omreport about
Product name : Dell OpenManage Server Administrator
Version      : 8.3.0
Copyright    : Copyright (C) Dell Inc. 1995-2015 All rights reserved.
Company      : Dell Inc.&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;The following are the rpms installed via yum
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# rpm -qa | grep srvadmin
srvadmin-xmlsup-8.3.0-1908.9058.el7.x86_64
srvadmin-omacore-8.3.0-1908.9058.el7.x86_64
srvadmin-server-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-oslog-8.3.0-1908.9058.el7.x86_64
srvadmin-idrac-vmcli-8.3.0-1908.9058.el7.x86_64
srvadmin-storageservices-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-smcommon-8.3.0-1908.9058.el7.x86_64
srvadmin-omcommon-8.3.0-1908.9058.el7.x86_64
srvadmin-smweb-8.3.0-1908.9058.el7.x86_64
srvadmin-racsvc-8.3.0-1908.9058.el7.x86_64
srvadmin-nvme-8.3.0-1908.9058.el7.x86_64
srvadmin-storage-cli-8.3.0-1908.9058.el7.x86_64
srvadmin-storageservices-8.3.0-1908.9058.el7.x86_64
srvadmin-omilcore-8.3.0-1908.9058.el7.x86_64
srvadmin-racadm4-8.3.0-1908.9058.el7.x86_64
srvadmin-isvc-8.3.0-1908.9058.el7.x86_64
srvadmin-argtable2-8.3.0-1908.9058.el7.x86_64
srvadmin-racadm5-8.3.0-1908.9058.el7.x86_64
srvadmin-cm-8.3.0-1908.9058.el7.x86_64
srvadmin-isvc-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-rac4-populator-8.3.0-1908.9058.el7.x86_64
srvadmin-tomcat-8.3.0-1908.9058.el7.x86_64
srvadmin-itunnelprovider-8.3.0-1908.9058.el7.x86_64
srvadmin-storelib-sysfs-8.3.0-1908.9058.el7.x86_64
srvadmin-storageservices-cli-8.3.0-1908.9058.el7.x86_64
srvadmin-deng-8.3.0-1908.9058.el7.x86_64
srvadmin-rac-components-8.3.0-1908.9058.el7.x86_64
srvadmin-ominst-8.3.0-1908.9058.el7.x86_64
srvadmin-sysfsutils-8.3.0-1908.9058.el7.x86_64
srvadmin-rac5-8.3.0-1908.9058.el7.x86_64
srvadmin-base-8.3.0-1908.9058.el7.x86_64
srvadmin-idrac-ivmcli-8.3.0-1908.9058.el7.x86_64
srvadmin-rac4-8.3.0-1908.9058.el7.x86_64
srvadmin-webserver-8.3.0-1908.9058.el7.x86_64
srvadmin-standardAgent-8.3.0-1908.9058.el7.x86_64
srvadmin-storelib-8.3.0-1908.9058.el7.x86_64
srvadmin-storage-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-omacs-8.3.0-1908.9058.el7.x86_64
srvadmin-racdrsc-8.3.0-1908.9058.el7.x86_64
srvadmin-idracadm-8.3.0-1908.9058.el7.x86_64
srvadmin-idrac-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-realssd-8.3.0-1908.9058.el7.x86_64
srvadmin-storage-8.3.0-1908.9058.el7.x86_64
srvadmin-all-8.3.0-1908.9058.el7.x86_64
srvadmin-hapi-8.3.0-1908.9058.el7.x86_64
srvadmin-deng-snmp-8.3.0-1908.9058.el7.x86_64
srvadmin-server-cli-8.3.0-1908.9058.el7.x86_64
srvadmin-jre-8.3.0-1908.9058.el7.x86_64
srvadmin-idrac-8.3.0-1908.9058.el7.x86_64&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/705438964411517706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/705438964411517706' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/705438964411517706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/705438964411517706'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2016/08/dell-omsa-83-on-centos-72-error-chassis_66.html' title='Dell OMSA 8.3 on CentOS 7.2 &quot;Error! Chassis info setting unavailable on this system.&quot;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-2918927595388512732</id><published>2016-06-22T14:42:00.001-05:00</published><updated>2016-06-22T14:42:37.805-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bright computing"/><category scheme="http://www.blogger.com/atom/ns#" term="brightcm"/><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="cmsh"/><category scheme="http://www.blogger.com/atom/ns#" term="dell"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openmanage"/><category scheme="http://www.blogger.com/atom/ns#" term="poweredge"/><category scheme="http://www.blogger.com/atom/ns#" term="r630"/><category scheme="http://www.blogger.com/atom/ns#" term="racadm"/><category scheme="http://www.blogger.com/atom/ns#" term="rhel"/><title type='text'>How To: Enable PXE and Configure Boot Order Via Dell RACADM Command</title><content type='html'>Our HPC cluster was lucky enough double in compute capacity recently. Whoop! The new hardware brought with it some significant changes in rack layout and networking fabric. The compute nodes are a combination of Dell R630, DSS1500 and R730 (for GPU K80 and Intel Phi nodes).&lt;br /&gt;
&lt;br /&gt;
The existing core 10GbE CAT6 based fabric (made up of &lt;a href=&quot;http://www.dell.com/us/business/p/force10-s4820/pd&quot; target=&quot;_blank&quot;&gt;Dell Force10 S4820T&lt;/a&gt;) was replaced by a &lt;a href=&quot;http://en.community.dell.com/techcenter/networking/w/wiki/6449.dell-networking-z9500&quot; target=&quot;_blank&quot;&gt;Dell Force10 Z9500&lt;/a&gt; and fiber (Z9500 has 132 QSFP+ 40GbE ports that can in turn be broken out into 528 10GbE SFP+ ports).&lt;br /&gt;
&lt;br /&gt;
Physical changes aside (like wiring, top of rack 40GbE to 10GbE breakout panels, etc...), the above meant we had to change the primary boot device from the addon 10GbE CAT6 based NIC to the onboard fiber 10GbE NIC (CentOS 7 sees this interface as &lt;b&gt;eno1&lt;/b&gt;).&lt;br /&gt;
&lt;br /&gt;
This required two changes at the system BIOS / nic hardware config level&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Enable PXE boot on the NIC&lt;/li&gt;
&lt;li&gt;Modify the BIOS boot order&lt;/li&gt;
&lt;/ul&gt;
One method to make these two changes in bulk is to use the Dell OpenManage command line tool &lt;b&gt;racadm&lt;/b&gt;,&amp;nbsp;which was what we decided to use.&lt;br /&gt;
&lt;br /&gt;
The following are notes I took while working on a subset of the compute nodes.&lt;br /&gt;
&lt;h4&gt;
Enable PXE on the fiber interface
&lt;/h4&gt;
&lt;div&gt;
The first step is to identify the names of the network interfaces. I queried a single node to get the full list of interfaces followed by querying the specific interface (.1) just for grins to see what settings were available. In this case the first integrated port is referenced as &lt;b&gt;NIC.nicconfig.1&lt;/b&gt; and &lt;b&gt;NIC.Integrated.1-1-1&lt;/b&gt;&lt;/div&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# Get list of Nics
racadm -r 172.16.3.48 -u root -p xxxxxxx get nic.nicconfig

NIC.nicconfig.1 [Key=NIC.Integrated.1-1-1#nicconfig]
NIC.nicconfig.2 [Key=NIC.Integrated.1-2-1#nicconfig]
NIC.nicconfig.3 [Key=NIC.Integrated.1-3-1#nicconfig]
NIC.nicconfig.4 [Key=NIC.Integrated.1-4-1#nicconfig]
NIC.nicconfig.5 [Key=NIC.Slot.3-1-1#nicconfig]
NIC.nicconfig.6 [Key=NIC.Slot.3-2-1#nicconfig]

racadm -r 172.16.3.48 -u root -p xxxxxxx get nic.nicconfig.1

[Key=NIC.Integrated.1-1-1#nicconfig]
LegacyBootProto=NONE
#LnkSpeed=AutoNeg
NumberVFAdvertised=64
VLanId=0
WakeOnLan=Disabled

 &lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
Next we can enable PXE boot on NIC.Integrated.1-1-1 for the set of nodes. In order for the change to take affect you have to create a job followed by a reboot.&lt;/div&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;for n in {48..10} ; do
  ip=172.16.3.${n}
  echo &quot;IP: $ip - configuring nic.nicconfig.1.legacybootproto PXE&quot;
  # Get Nic config for integrated port 1
  racadm -r $ip -u root -p xxxxxxx get nic.nicconfig.1 | grep Legacy
  # Set to PXE
  racadm -r $ip -u root -p xxxxxxx set nic.nicconfig.1.legacybootproto PXE
  # Verify it&#39;s set to PXE (pending)
  racadm -r $ip -u root -p xxxxxxx get nic.nicconfig.1 | grep Legacy
  # Create a job to enable the changes following the reboot
  racadm -r $ip -u root -p xxxxxxx jobqueue create NIC.Integrated.1-1-1
  # reboot so that the configur job will execute
  ipmitool -I lanplus -H $ip -U root -P xxxxxxx chassis power reset
done &lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;
Configure the BIOS boot order
&lt;/h4&gt;
&lt;div&gt;
Now that the NIC has PXE enabled and the changes have been applied, the boot order can be modified. If this fails for a node it either means that the job failed to run in the previous step, start debugging.&lt;/div&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;for n in {48..10} ; do
  ip=172.16.3.${n}
  echo &quot;IP: $ip - configuring BIOS.biosbootsettings.BootSeq NIC.Integrated.1-1-1,....&quot;
  # Get Bios Boot sequence
  racadm -r $ip -u root -p xxxxxxx get BIOS.biosbootsettings.BootSeq | grep BootSeq
  # Set Bios boot sequence
  racadm -r $ip -u root -p xxxxxxx set BIOS.biosbootsettings.BootSeq NIC.Integrated.1-1-1,NIC.Integrated.1-3-1,NIC.Slot.3-1-1,Optical.SATAEmbedded.J-1,HardDisk.List.1-1
  # Create a BIOS reboot job so that the boot order changes are applied
  racadm -r $ip -u root -p xxxxxxx jobqueue create BIOS.Setup.1-1 -r pwrcycle -s TIME_NOW -e TIME_NA
done
 &lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;
Modify the switch and port locations in BrightCM&lt;/h4&gt;
We use &lt;a href=&quot;http://www.brightcomputing.com/product-offerings/bright-cluster-manager-for-hpc&quot; target=&quot;_blank&quot;&gt;Bright Computing Cluster Manager for HPC&lt;/a&gt; to manage our HPC nodes (this recently replaced &lt;a href=&quot;http://www.rocksclusters.org/wordpress/&quot; target=&quot;_blank&quot;&gt;Rocks&lt;/a&gt;&amp;nbsp;in our environment). Within BrightCM we had to modify the boot interface for the set of compute nodes. BrightCM provides excellent CLI support, hooray!&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;cmsh -c &quot;device foreach -n node0001..node0039 (interfaces; use bootif; set networkdevicename eno1); commit&quot;
 &lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;
Update the switch port locations in BrightCM&lt;/h4&gt;
&lt;div&gt;
BrightCM keeps track of the switch port to node NIC mapping. One reason for this is to prevent accidentally imprinting the wrong image on nodes that got swapped (i.e. you remove two nodes for service and insert them back into the rack in the wrong location).&lt;/div&gt;
&lt;div&gt;
First I had to identify the new port number for a node, I chose the node that would be last in sequence on the switch. This happened to show up in BrightCM as port 171. I found this by PXE booting the compute node, once it comes up BrightCM notices a discrepancy and displays an interface that allows you to manually address the issue, something akin to &quot;node0039 should be on switch XXX port ## but it&#39;s showing up on switch z9500-r05-03-38 port 171&quot; blah blah blah.&lt;/div&gt;
&lt;div&gt;
Instead of manually addressing the issue, it can be done via the CLI in bulk (assuming there&#39;s a sequence). Each of our nodes have two NICs wired to the Z9500 (node0039 would be on ports 171 and 172), thus in the code below I decrement by 2 ports for each node&#39;s boot device.&lt;/div&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;port=171
for n in {39..26} ; do
  let port=${port}-2
  cmsh -c &quot;device; set node00${n} ethernetswitch z9500-r05-03-38:${port}; commit ;&quot;
done
unset port
 &lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/2918927595388512732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/2918927595388512732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/2918927595388512732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/2918927595388512732'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2016/06/how-to-enable-pxe-and-configure-boot.html' title='How To: Enable PXE and Configure Boot Order Via Dell RACADM Command'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8185595354756733509</id><published>2015-08-07T12:15:00.001-05:00</published><updated>2016-06-22T09:36:42.535-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dell"/><category scheme="http://www.blogger.com/atom/ns#" term="iDRAC"/><category scheme="http://www.blogger.com/atom/ns#" term="OME"/><category scheme="http://www.blogger.com/atom/ns#" term="Open Manage Essentials"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenManage Essentials"/><category scheme="http://www.blogger.com/atom/ns#" term="winrm"/><title type='text'>How To: Clear Dell iDRAC Job Queue</title><content type='html'>I&#39;m in the process of deploying 41 new Dell R630 PowerEdge servers in our HPC environment. To help manage the hardware I&#39;m using a new tool (to us anyways), &lt;a href=&quot;https://marketing.dell.com/ome-software&quot; target=&quot;_blank&quot;&gt;Dell OpenManage Essentials&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
OME requires a Microsoft Windows OS, luckily (since we are a Linux shop) it&#39;s a snap to install Windows Server 2012 in KVM.&lt;br /&gt;
&lt;br /&gt;
Some of the functionality provided by OME:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Reporting and alerting&lt;/li&gt;
&lt;li&gt;Firmware upgrades&lt;/li&gt;
&lt;li&gt;Configuration deployment (BIOS settings, iDRAC, RAID, etc...)&lt;/li&gt;
&lt;li&gt;Bare metal provisioning&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
While OME is free, some of the features require a license. I&#39;ve only been using OME for a couple of days so I haven&#39;t had a chance to test all of its features, but I have found that configuration requires a license (ex: ability to push a configuration template out to a node(s)). Firmware upgrades and reporting do not require a license.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first task to be handled by OME, firmware upgrades on all 41 nodes. My initial attempts failed. Reading through the logs revealed that the remote clients couldn&#39;t reach TCP port 1278 on the OME server. Firmware upgrades started deploying after opening that TCP 1278 in the Windows firewall.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Each server had a long list of upgrades including BIOS, iDRAC, and the 6 network cards (mix of 10Gbit and 1Gbit). All of the firmware deployed successfully, with the exception of the Ethernet cards. Grrr, back to the scanning the logs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Results: &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Downloading Packages.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Calling InstallFromUri method to Download packages to the iDRAC&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;There are some pending reboot jobs on the iDRAC that maybe block updating the system. &lt;b style=&quot;background-color: yellow;&quot;&gt;It is recommended that you clear all the jobs before updating&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Downloading Package: Network_Firmware_6FD9P_WN64_16.5.20_A00.EXE onto the iDRAC&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Package download has successfully started and the Job ID is JID_388846411941&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;The URI given to the iDRAC to download from: http://192.168.2.69:1278/install_packages/Packages/Network_Firmware_6FD9P_WN64_16.5.20_A00.EXE&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ok, but how do you do this? I didn&#39;t see any native way to do this from within OME, so on to Google.&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Thanks to &lt;a href=&quot;http://www.jonmunday.net/2013/06/20/dell-vc-plugin-idrac-queued-jobs&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;&amp;nbsp;on Jon Munday&#39;s blog, I was able to clear the pending jobs with a little PowerShell for loop action to hit all nodes.&lt;br /&gt;
&lt;br /&gt;
The following command displays the job queue for the range of compute nodes (192.16.2.10 thru 50)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;For ($i=10; $i -lt 51; $i++) { winrm e cimv2/root/dcim/DCIM_LifecycleJob -u:$USER -p:$PASSWORD -SkipCNcheck -SkipCAcheck -r:https://192.168.2.$i/wsman -auth:basic -encoding:utf-8 }
 &lt;/code&gt;&lt;/pre&gt;
The next command clears the queue. Sorry for the long single line, I don&#39;t know if PowerShell supports spanning a command across multiple lines like I can do in Bash:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;For ($i=10; $i -lt 51; $i++) { winrm invoke DeleteJobQueue &quot;cimv2/root/dcim/DCIM_JobService?CreationClassName=DCIM_JobService+Name=JobService+SystemName=Idrac+SystemCreationClassName=DCIM_ComputerSystem&quot; &#39;@{JobID=&quot;JID_CLEARALL&quot;}&#39; -r:https://192.168.2.$i/wsman -u:$USER -p:$PASSWORD -SkipCNCheck -SkipCACheck -auth:basic -encoding:utf-8 -format:pretty }
 &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8185595354756733509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8185595354756733509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8185595354756733509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8185595354756733509'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2015/08/how-to-clear-dell-idrac-job-queue.html' title='How To: Clear Dell iDRAC Job Queue'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-3777752776914211066</id><published>2015-05-29T23:24:00.001-05:00</published><updated>2015-05-31T13:43:16.513-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="macbook"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="textwrangler"/><title type='text'>A Linux User&#39;s First Time on a Mac</title><content type='html'>I&#39;m in the process of switching from a &lt;a href=&quot;http://www.dell.com/learn/us/en/555/campaigns/xps-linux-laptop?c=us&amp;amp;l=en&amp;amp;s=biz&quot; target=&quot;_blank&quot;&gt;Dell XPS 13 (Project Sputnik)&lt;/a&gt; ultrabook to a Macbook Pro 13 (Broadwell i7). The battery life on my current laptop was horrible, an hour of real world use with the screen dimmed and killing running applications like Scrooge. Unfortunately, the XPS solders the battery onboard, so it&#39;s not easily replaced (if at all?). It still functions great when near power.&lt;br /&gt;
&lt;br /&gt;
You may be thinking, why would you do such a thing if you are a Linux user?&lt;br /&gt;
&lt;br /&gt;
For starters, the specs for the Macbook Pro 13 (Spring 2015) are better than the XPS for a similar cost (how much is of course open to interpretation):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Intel 3.1 GHz Core i7-5557U vs &amp;nbsp;3.0 GHz Core i7-5500U Processor&lt;/li&gt;
&lt;li&gt;16 GB (optional) vs 8 GB RAM&lt;/li&gt;
&lt;li&gt;Intel Iris 6100 vs Intel HD Graphics 5500&lt;/li&gt;
&lt;li&gt;PCIe based SSD vs SATA&lt;/li&gt;
&lt;li&gt;Non-touch Retina Display vs touch UltraSharp QHD+ (personally I don&#39;t see the value yet in having a touch screen on a Linux laptop, especially considering the screen doesn&#39;t completely fold over)&lt;/li&gt;
&lt;li&gt;Magsafe Power Adapter&lt;/li&gt;
&lt;li&gt;Proven battery life&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
I do most of my work via SSH to the Linux systems, so the workstation doesn&#39;t have to be Linux, although it makes life much less painful. I figured, what the heck, let&#39;s try a BSD like system that has a history of awesome battery life.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.quickanddirtytips.com/education/grammar/ado-versus-adieu?page=all&quot; target=&quot;_blank&quot;&gt;Without further ado&lt;/a&gt;, here are some of my experiences using a Mac and OSX for the first time as a Linux user.&lt;/div&gt;
&lt;h2&gt;
Useful Applications&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ohmyz.sh/&quot; target=&quot;_blank&quot;&gt;Oh My Zsh&lt;/a&gt; - Trying out Zsh shell as an alternative for Bash for the first time, pretty darn cool.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://lightheadsw.com/caffeine/&quot; target=&quot;_blank&quot;&gt;Caffeine&lt;/a&gt; - Useful for temporarily preventing the laptop from sleeping (don&#39;t kill my SSH or VPN connections, dangit!&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://iterm2.com/&quot; target=&quot;_blank&quot;&gt;iTerm2&lt;/a&gt; - Really nice terminal replacement for the builtin OSX terminal. &lt;a href=&quot;https://iterm2.com/features.html&quot; target=&quot;_blank&quot;&gt;Ton&#39;s of features&lt;/a&gt; like built in Tmux, search, transparent background, it&#39;s own built in auto completion (Cmd ;), etc... This part was what got me searching for a new terminal in the first place &quot;Coming from a Unix world? You&#39;ll feel at home with focus follows mouse, copy on select, middle button paste, and keyboard shortcuts to avoid mousing.&quot;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://magicprefs.com/&quot; target=&quot;_blank&quot;&gt;MagicPrefs&lt;/a&gt; - This app lets you configure middle mouse paste functionality on the trackpad (set mine to three finger press)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://itunes.apple.com/us/app/xchat-azure/id447521961?mt=12&quot; target=&quot;_blank&quot;&gt;XChat Azure&lt;/a&gt; - Excellent IRC client&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.barebones.com/products/textwrangler/&quot; target=&quot;_blank&quot;&gt;TextWrangler&lt;/a&gt; - Extremely nice graphical script editor&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://products.office.com/en-us/mac/mac-preview&quot; target=&quot;_blank&quot;&gt;Microsoft Office 2016 Preview&lt;/a&gt; - Because I need it Office work&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;
Graphical Text Editor&lt;/h2&gt;
&lt;div&gt;
I use vi/vim extensively on Linux and now on my Macbook Pro. That said, I do like to edit in a GUI text editor as well. After a good bit of searching around, &lt;a href=&quot;http://www.barebones.com/products/textwrangler/&quot; target=&quot;_blank&quot;&gt;TextWrangler&lt;/a&gt; is the (free) one I&#39;ve been most happy using.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The way I understand it, TextWrangler is sort of the little brother to the professional product BBEdit, which adds &quot;its extensive professional feature set including Web authoring capabilities and software development tools&quot;. I primarily work with Ruby (shell scripts, not Rails), Perl, Bash, Puppet and other system management type scripting, TextWrangler works very well for these.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One thing I found missing that I use regularly in other editors is the ability to duplicate a line without the cumbersome highlight, copy, paste. Many GUI editors provide this ability using a shortcut like Ctrl&amp;nbsp;+ d, or in vi, yy p (yank yank paste).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After searching around in the keyboard shortcuts a Google search led me to &lt;a href=&quot;https://xinrongding.wordpress.com/2013/08/15/add-scripts-to-textwrangler/&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt; which mentioned creating an &quot;&lt;a href=&quot;http://www.macosxautomation.com/applescript/firsttutorial/02.html&quot; target=&quot;_blank&quot;&gt;AppleScript&lt;/a&gt;&quot; to accomplish the task. What tha?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
While the code did work, it left both the original and new lines highlighted, which was a bit annoying. I decided I wanted the cursor to remain where it originally was located. By the way, in TextWrangler, the &quot;&lt;b&gt;cursor&lt;/b&gt;&quot; is called the &quot;&lt;b&gt;insertion point&lt;/b&gt;&quot; both in the documentation and in AppleScript.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, here&#39;s my updated script (my changes are the single lines following each comment):&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
tell application &quot;TextWrangler&quot;
  tell window 1
    # Get the current position for the cursor so we can pace it back
    set cursorLoc to characterOffset of selection
    select line the (startLine of the selection)
    copy (contents of the selection) as text to myText
    set the contents of the selection to myText &amp;amp; myText
    # Move the cursor back to the first column with a character
    select insertion point before character cursorLoc
  end tell
end tell  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
I searched all over the place to get a hint how to place the cursor back in it&#39;s original location. As you can see, AppleScript isn&#39;t syntactically like Ruby, Perl, Java, etc... It&#39;s pretty funky and totally dynamic based on the application being scripted. TextWrangler provides a dictionary, but I didn&#39;t find they contents very helpful.&lt;br /&gt;
&lt;br /&gt;
I finally stumbled on&amp;nbsp;&lt;a href=&quot;http://nathangrigg.net/2012/06/bbedit-search-with-applescript/&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;&amp;nbsp;that mentions using &quot;characterOffset of selection&quot;. Voila! All in all, it&#39;s pretty darn cool that the OS provides a simple way to extend the functionality of a GUI app.&lt;br /&gt;
&lt;br /&gt;
Create the script in the AppleScript Editor (either launch it from Spotlight Search (Command Space) or click the script menu next to Help in TextWrangler and &quot;Open Script Editor&quot;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste the code above, then save it in the directory&lt;br /&gt;
&quot;&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;~/Library/Application\ Support/TextWrangler/Scripts&lt;/span&gt;&lt;/b&gt;&quot;&lt;br /&gt;
as something like DuplicateLine.scpt (the extension will get added automatically).&lt;br /&gt;
&lt;br /&gt;
Next, restart TextWrangler and go to Window -&amp;gt; Palettes -&amp;gt; Scripts, click on DuplicateLine in the list and click Set Shortcut. Set it to whatever, I set mine to Ctrl D. This shortcut is already set to delete line, so I altered that shortcut in preferences to Shift Ctrl D.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/3777752776914211066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/3777752776914211066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3777752776914211066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3777752776914211066'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2015/05/a-linux-users-first-time-on-mac.html' title='A Linux User&#39;s First Time on a Mac'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-3028502099737520424</id><published>2014-07-09T18:04:00.000-05:00</published><updated>2014-07-10T11:54:51.514-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="centos6"/><category scheme="http://www.blogger.com/atom/ns#" term="centos6.5"/><category scheme="http://www.blogger.com/atom/ns#" term="check_mk"/><category scheme="http://www.blogger.com/atom/ns#" term="check_openmanage"/><category scheme="http://www.blogger.com/atom/ns#" term="el6"/><category scheme="http://www.blogger.com/atom/ns#" term="el6.5"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="omd"/><category scheme="http://www.blogger.com/atom/ns#" term="open monitor distribution"/><category scheme="http://www.blogger.com/atom/ns#" term="rhel"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL6"/><category scheme="http://www.blogger.com/atom/ns#" term="wato"/><title type='text'>Using Check_Openmanage with Check_MK via WATO</title><content type='html'>&lt;p&gt;In an &lt;a href=&quot;http://flakrat.blogspot.com/2011/03/using-checkopenmanage-with-checkmk.html&quot;&gt;older post&lt;/a&gt; I described the steps to integrate &lt;a href=&quot;http://folk.uio.no/trondham/software/check_openmanage.html&quot;&gt;check_openmanage&lt;/a&gt; Nagios plugin with &lt;a href=&quot;http://mathias-kettner.com/check_mk_introduction.html&quot;&gt;check_mk&lt;/a&gt;. This approach required manually editing the etc/check_mk/main.mk file to configure the extra_nagios_conf and legacy_checks.&lt;/p&gt;
&lt;p&gt;This updated guide uses the check_mk &lt;a href=&quot;http://mathias-kettner.com/checkmk_wato.html&quot;&gt;WATO&lt;/a&gt; (Web Administration Tool) to integrate the check_openmanage check using a feature called &quot;Active Checks&quot;.&lt;/p&gt;
&lt;p&gt;Here&#39;s the guide, hope it helps:&lt;/p&gt;

&lt;h2&gt;Environment:&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;CentOS 6.5 x86_64 VMware ESXi hosted virtual machine&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://omdistro.org/&quot;&gt;OMD 1.10&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://folk.uio.no/trondham/software/check_openmanage.html&quot;&gt;check_openmanage 3.7.11&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://mathias-kettner.de/check_mk_introduction.html&quot;&gt;Check_mk 1.2.5i4&lt;/a&gt; upgraded using &lt;a href=&quot;http://lists.mathias-kettner.de/pipermail/omd-users/2014-June/000879.html&quot;&gt;these steps&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;Dell servers are checked via check_openmanage using SNMP rather than MRPE (or NRPE)&lt;br /&gt;
&lt;/ul&gt;
&lt;h2&gt;Install Check_openmanage&lt;/h2&gt;
Unless otherwise specified all paths are relative to the site owners home (ex: /opt/omd/sites/mysite)
&lt;ol&gt;&lt;li&gt;Make sure your dell servers had the following SNMP packages installed prior to installing OMSA (if not, it&#39;s easy to &#39;yum remove srvadmin-\*&#39; &#39;yum install srvadmin-all&#39;: net-snmp, net-snmp-libs, net-snmp-utils&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Start the OMSA services &#39;srvadmin-services.sh start&#39; and then check &#39;srvadmin-services.sh status&#39; to verify that the snmpd component is running&lt;br /&gt;
&lt;li&gt;Ensure that snmpd is running and configured&lt;br /&gt;
&lt;li&gt;Configure the firewall to allow access from your OMD server to udp port 161&lt;br /&gt;
&lt;/ul&gt;

&lt;li&gt;change users on your OMD server to the site user: $ su - mysite&lt;br /&gt;
&lt;li&gt;Download the latest check_openmanage from &lt;a href=&quot;http://folk.uio.no/trondham/software/check_openmanage.html&quot;&gt;http://folk.uio.no/trondham/software/check_openmanage.html&lt;/a&gt; to ~/tmp and extract&lt;br /&gt;
&lt;li&gt;copy the check_openmanage script to local/lib/nagios/plugins (this defaults to $USER2$ in your commands)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ cp tmp/check_openmanage-3.7.11/check_openmanage local/lib/nagios/plugins/
$ chmod +x local/lib/nagios/plugins/check_openmanage
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;copy the PNP4Nagios template&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ cp tmp/check_openmanage-3.7.11/check_openmanage.php etc/pnp4nagios/templates/
&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Test check_openmanage to see that it can successfully query a node&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
local/lib/nagios/plugins/check_openmanage -H dell-r720xd-01 -p -C MySecretCommunity

OK - System: &#39;PowerEdge R720xd&#39;, SN: &#39;XXXXXX1&#39;, 24 GB ram (6 dimms), 2 logical drives, 14 physical drives|T0_System_Board_Inlet=21C;42;47 T1_System_Board_Exhaust=30C;70;75 T2_CPU1=48C;86;91 T3_CPU2=39C;86;91 W2_System_Board_Pwr_Consumption=126W;0;0 A0_PS1_Current_1=0.6A;0;0 A1_PS2_Current_2=0.2A;0;0 V25_PS1_Voltage_1=240V;0;0 V26_PS2_Voltage_2=240V;0;0 F0_System_Board_Fan1=2280rpm;0;0 F1_System_Board_Fan2=2280rpm;0;0 F2_System_Board_Fan3=2280rpm;0;0 F3_System_Board_Fan4=3000rpm;0;0 F4_System_Board_Fan5=3600rpm;0;0 F5_System_Board_Fan6=3480rpm;0;0

&lt;/code&gt;&lt;/pre&gt;
&lt;/ol&gt;

&lt;h2&gt;WATO Configuration&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Create a Host Group by clicking &lt;b&gt;Host Groups&lt;/b&gt; under &lt;b&gt;WATO - Configuration&lt;/b&gt;, click &lt;b&gt;New Group&lt;/b&gt; (click save when done):
  &lt;ul&gt;
    &lt;li&gt;Name: omsa
    &lt;li&gt;Alias: Dell OpenManage
  &lt;/ul&gt;
  &lt;li&gt;Create a Host Tag by clicking &lt;b&gt;Host Tags&lt;/b&gt; under &lt;b&gt;WATO - Configuration&lt;/b&gt;, click &lt;b&gt;New Tag Group&lt;/b&gt; (click save when done):
  &lt;ul&gt;
    &lt;li&gt;Internal ID: dellomsa
    &lt;li&gt;Topic: (leave empty)
    &lt;li&gt;Choices:
      &lt;ul&gt;
        &lt;li&gt;Tag ID: omsa
        &lt;li&gt;Description: Dell OpenManage
      &lt;/ul&gt;
  &lt;/ul&gt;
  &lt;li&gt;Create a Active Check by clicking &lt;b&gt;Host &amp; Service Parameter&lt;/b&gt; under &lt;b&gt;WATO - Configuration&lt;/b&gt;, click &lt;b&gt;Active Checks&lt;/b&gt;, click &lt;b&gt;Classical active and passive Nagios checks&lt;/b&gt; (create a new one, click save when done):
  &lt;ul&gt;
    &lt;li&gt;Folder: Main Directory
    &lt;li&gt;Host Tags: Select &lt;b&gt;Dell OpenManage is set&lt;/b&gt;
    &lt;li&gt;Service Description: check_openmanage
    &lt;li&gt;Commmand Line: $USER2$/check_openmanage -H $HOSTADDRESS$ -p -C MySecretCommunity
    &lt;li&gt;Service Description: check_openmanage
    &lt;li&gt;Check Perfomance Data
  &lt;/ul&gt;
  &lt;li&gt;Add the omsa Host Tag to a host running OpenManage with SNMP configured by clicking &lt;b&gt;Hosts&lt;/b&gt; under &lt;b&gt;WATO - Configuration&lt;/b&gt;, and click the properties editor (pencil icon) for the host (click &lt;b&gt;Save &amp; go to Services&lt;/b&gt; when done):
  &lt;ul&gt;
    &lt;li&gt;Host tags: Dell OpenManage: check Dell OpenManage twice
  &lt;/ul&gt;
&lt;/ol&gt;

&lt;br /&gt;
On the Host services page you should see the new service at the bottom, example:
&lt;pre&gt;
Custom checks (defined via rule)
Status  Checkplugin   Item              Service Description  Plugin output    
OK      custom        check_openmanage  check_openmanage     OK - System: &#39;PowerEdge R710&#39;, SN: &#39;XXXXXX1&#39;, 24 GB ram (6 dimms), 2 logical drives, 14 physical drives
&lt;/pre&gt;
Click &lt;b&gt;Activate Missing&lt;/b&gt; services or &lt;b&gt;Save manual check configuration&lt;/b&gt;. Activate the changes and you should start seeing the check within a few minutes and graphs after 10 minutes or so.
Hope this helps, and comments are welcome.</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/3028502099737520424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/3028502099737520424' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3028502099737520424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3028502099737520424'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2014/07/using-checkopenmanage-with-checkmk-via.html' title='Using Check_Openmanage with Check_MK via WATO'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-1863495521498902012</id><published>2014-06-24T11:58:00.001-05:00</published><updated>2014-08-12T08:56:25.977-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="certificate authority"/><category scheme="http://www.blogger.com/atom/ns#" term="crt"/><category scheme="http://www.blogger.com/atom/ns#" term="csr"/><category scheme="http://www.blogger.com/atom/ns#" term="foreman"/><category scheme="http://www.blogger.com/atom/ns#" term="key"/><category scheme="http://www.blogger.com/atom/ns#" term="openssl"/><category scheme="http://www.blogger.com/atom/ns#" term="pem"/><category scheme="http://www.blogger.com/atom/ns#" term="puppet"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl"/><title type='text'>Replace The Foreman Self Signed Certificate with a Trusted Certificate</title><content type='html'>&lt;p&gt;I&#39;ve installed a few &lt;a href=&quot;http://theforeman.org/&quot;&gt;Foreman&lt;/a&gt; servers to provide provisioning and configuration management (via &lt;a href=&quot;https://puppetlabs.com/puppet/puppet-open-source&quot;&gt;Puppet&lt;/a&gt;). This document will cover the steps to replace the self signed certificate used for the web interface with a trusted certificate.&lt;/p&gt;

&lt;p&gt;For those unfamiliar with Foreman and Puppet, here are snippet from both project pages (&lt;a href=&quot;http://theforeman.org/learn_more.html&quot;&gt;http://theforeman.org/learn_more.html&lt;/a&gt; and &lt;a href=&quot;http://puppetlabs.com/puppet/what-is-puppet&quot;&gt;http://puppetlabs.com/puppet/what-is-puppet&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;Foreman is an open source project that helps system administrators manage servers throughout their lifecycle, from provisioning and configuration to orchestration and monitoring. Using Puppet or Chef and Foreman&#39;s smart proxy architecture, you can easily automate repetitive tasks, quickly deploy applications, and proactively manage change, both on-premise with VMs and bare-metal or in the cloud.&lt;br /&gt;&lt;br /&gt;

Foreman provides comprehensive, interaction facilities including a web frontend, CLI and RESTful API which enables you to build higher level business logic on top of a solid foundation.&lt;/blockquote&gt;

&lt;blockquote&gt;Puppet is IT automation software that defines and enforces the state of your infrastructure throughout your software development cycle. From provisioning and configuration to orchestration and reporting, from initial code development through production release and updates, Puppet frees sysadmins from writing one-off, fragile scripts and other manual tasks. At the same time, Puppet ensures consistency and dependability across your infrastructure.&lt;br /&gt;&lt;br /&gt;

With Puppet, repetitive tasks are automated away, so sysadmins can quickly deploy business applications, scaling easily from tens of servers to thousands, both on-premise and in the cloud.&lt;/blockquote&gt;

&lt;p&gt;By default, the &lt;a href=&quot;https://puppetlabs.com/puppet/puppet-open-source&quot;&gt;Puppet&lt;/a&gt; / &lt;a href=&quot;http://theforeman.org/&quot;&gt;Foreman&lt;/a&gt; &lt;a href=&quot;http://theforeman.org/manuals/1.5/index.html#3.InstallingForeman&quot;&gt;server install&lt;/a&gt; uses Puppet&#39;s own internal CA for issuing SSL certificates. The Foreman install defaults to using the Puppet CA self signed cert for the web interface. &lt;b&gt;The following steps will replace The Foreman&#39;s SSL certificate for the user web interface, but will leave the Puppet CA and SSL certs in place for Puppet related work.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I spent a bit of time trying to get this working, but each attempt resulted in a working web interface and broken Puppet master to client communications and Foreman proxy. Essentially, I was changing the SSL certificate entries in too many locations. Dominic on the #theforeman channel on FreeNode IRC directed me to this &lt;a href=&quot;https://groups.google.com/forum/#!topic/foreman-users/MMug-F4hNHg&quot;&gt;Google Groups thread&lt;/a&gt; that listed the short list of places to make the change. The following steps are based on that post.&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Create the SSL key and csr
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;sudo su - 
mkdir /root/Incommon-cert
cd /root/Incommon-cert

openssl req -out $(hostname)-2048.csr -new -newkey rsa:2048 -nodes -keyout $(hostname -f)-2048.key&lt;/pre&gt;
&lt;li&gt;Copy the contents of the csr to the clipboard and use it to request an InCommon SSL certificate
&lt;li&gt;Once the cert is approved, download the following files to /root/Incommon-cert on the Puppet / Foreman server:
&lt;ul&gt;&lt;li&gt;as X509 Certificate only, Base64 encoded
  &lt;li&gt;as X509 Intermediates/root only, Base64 encoded&lt;/ul&gt;
&lt;li&gt;Rename the files so that we know these are InCommon files
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;mv puppet.tld.blah.crt puppet.tld.blah-2048-incommon-cert.crt
mv puppet.tld.blah_interm.crt puppet.tld.blah-2048-incommon-interm.crt
chown root:root *.crt&lt;/pre&gt;
&lt;li&gt;Copy the files to the appropriate directories
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;cp puppet.tld.blah-2048.key /var/lib/puppet/ssl/private_keys/
cp puppet.tld.blah-2048-incommon-cert.crt /var/lib/puppet/ssl/certs/
cp puppet.tld.blah-2048-incommon-interm.crt /var/lib/puppet/ssl/certs/
wget https://www.incommon.org/certificates/repository/incommon-ssl.ca-bundle -O /var/lib/puppet/ssl/certs/incommon-ssl.ca-bundle&lt;/pre&gt;
&lt;li&gt;Set the appropriate permissions and SELinux configs for the key
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/lib/puppet/ssl/private_keys/
chown puppet:puppet *.key
chmod 640 *.key
chcon -u system_u -r object_r -t puppet_var_lib_t *.key

ls -lZ
-rw-r-----. puppet puppet system_u:object_r:puppet_var_lib_t:s0 puppet.tld.blah-2048.key
-rw-r-----. puppet puppet system_u:object_r:puppet_var_lib_t:s0 puppet.tld.blah.pem&lt;/pre&gt;
&lt;li&gt;Set perms and SELinux for the certs
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/lib/puppet/ssl/certs/
chown puppet:puppet *
chcon -u system_u -r object_r -t puppet_var_lib_t *.crt

ls -lZ
-rw-r--r--. puppet puppet system_u:object_r:puppet_var_lib_t:s0 ca.pem
-rw-r--r--. puppet puppet system_u:object_r:puppet_var_lib_t:s0 incommon-ssl.ca-bundle
-rw-r--r--. puppet puppet system_u:object_r:puppet_var_lib_t:s0 puppet.tld.blah-2048-incommon-cert.crt
-rw-r--r--. puppet puppet system_u:object_r:puppet_var_lib_t:s0 puppet.tld.blah-2048-incommon-interm.crt
-rw-r--r--. puppet puppet system_u:object_r:puppet_var_lib_t:s0 puppet.tld.blah.pem&lt;/pre&gt;
&lt;li&gt;Next edit the various config files
&lt;ul&gt;&lt;li&gt;/etc/puppet/node.rb: Change the line &lt;b&gt;:ssl_ca&lt;/b&gt; to use the new interm cert
&lt;br /&gt;&lt;pre class=&quot;brush:diff&quot;&gt;--- /etc/puppet/node.rb.orig 2014-03-24 17:48:09.215000045 -0500
+++ /etc/puppet/node.rb 2014-06-24 10:24:51.049282905 -0500
@@ -8,7 +8,8 @@
   :facts        =&gt; true,          # true/false to upload facts
   :timeout      =&gt; 10,
   # if CA is specified, remote Foreman host will be verified
-  :ssl_ca       =&gt; &quot;/var/lib/puppet/ssl/certs/ca.pem&quot;,      # e.g. /var/lib/puppet/ssl/certs/ca.pem
+  #:ssl_ca       =&gt; &quot;/var/lib/puppet/ssl/certs/ca.pem&quot;,      # e.g. /var/lib/puppet/ssl/certs/ca.pem
+  :ssl_ca       =&gt; &quot;/var/lib/puppet/ssl/certs/puppet.tld.blah-2048-incommon-interm.crt&quot;,      # e.g. /var/lib/puppet/ssl/certs/ca.pem
   # ssl_cert and key are required if require_ssl_puppetmasters is enabled in Foreman
   :ssl_cert     =&gt; &quot;/var/lib/puppet/ssl/certs/puppet.tld.blah.pem&quot;,    # e.g. /var/lib/puppet/ssl/certs/FQDN.pem
   :ssl_key      =&gt; &quot;/var/lib/puppet/ssl/private_keys/puppet.tld.blah.pem&quot;      # e.g. /var/lib/puppet/ssl/private_keys/FQDN.pem&lt;/pre&gt;
&lt;li&gt;/usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb: Change the &lt;b&gt;foreman_ssl_ca =&lt;/b&gt; line to use the interm cert
&lt;br /&gt;&lt;pre class=&quot;brush:diff&quot;&gt;--- /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb.orig 2014-03-24 17:44:37.494000046 -0500
+++ /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb 2014-06-24 10:28:54.497406986 -0500
@@ -5,7 +5,8 @@
 # URL of your Foreman installation
 $foreman_url=&#39;https://puppet.tld.blah&#39;
 # if CA is specified, remote Foreman host will be verified
-$foreman_ssl_ca = &quot;/var/lib/puppet/ssl/certs/ca.pem&quot;
+#$foreman_ssl_ca = &quot;/var/lib/puppet/ssl/certs/ca.pem&quot;
+$foreman_ssl_ca = &quot;/var/lib/puppet/ssl/certs/puppet.tld.blah-2048-incommon-interm.crt&quot;
 # ssl_cert and key are required if require_ssl_puppetmasters is enabled in Foreman
 $foreman_ssl_cert = &quot;/var/lib/puppet/ssl/certs/puppet.tld.blah.pem&quot;
 $foreman_ssl_key = &quot;/var/lib/puppet/ssl/private_keys/puppet.tld.blah.pem&quot;&lt;/pre&gt;
&lt;li&gt;/etc/httpd/conf.d/05-foreman-ssl.conf: Change three lines &lt;b&gt;SSLCertificateFile&lt;/b&gt;, &lt;b&gt;SSLCertificateKeyFile&lt;/b&gt; and &lt;b&gt;SSLCertificateChainFile&lt;/b&gt; to use the new cert, key and CA bundle respectively
&lt;br /&gt;&lt;pre class=&quot;brush:diff&quot;&gt;--- /etc/httpd/conf.d/05-foreman-ssl.conf.orig 2014-06-24 10:30:59.917531640 -0500
+++ /etc/httpd/conf.d/05-foreman-ssl.conf 2014-06-24 10:32:36.318164714 -0500
@@ -35,11 +35,18 @@
 
   ## SSL directives
   SSLEngine on
-  SSLCertificateFile      /var/lib/puppet/ssl/certs/puppet.tld.blah.pem
-  SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppet.tld.blah.pem
-  SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem
+  SSLCertificateFile      &quot;/var/lib/puppet/ssl/certs/puppet.tld.blah-2048-incommon-cert.crt&quot;
+  SSLCertificateKeyFile   &quot;/var/lib/puppet/ssl/private_keys/puppet.tld.blah-2048.key&quot;
+  SSLCertificateChainFile &quot;/var/lib/puppet/ssl/certs/incommon-ssl.ca-bundle&quot;
   SSLCACertificatePath    /etc/pki/tls/certs
   SSLCACertificateFile    /var/lib/puppet/ssl/certs/ca.pem
+
+#  SSLCertificateFile      /var/lib/puppet/ssl/certs/puppet.tld.blah.pem
+#  SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppet.tld.blah.pem
+#  SSLCertificateChainFile /var/lib/puppet/ssl/certs/ca.pem
+#  SSLCACertificatePath    /etc/pki/tls/certs
+#  SSLCACertificateFile    /var/lib/puppet/ssl/certs/ca.pem
+
   SSLVerifyClient         optional
   SSLVerifyDepth          3
   SSLOptions +StdEnvVars&lt;/pre&gt;&lt;/ul&gt;
&lt;li&gt;Restart the services (foreman-proxy restart probably isn&#39;t necessary but may as well)
&lt;br /&gt;&lt;pre class=&quot;brush:bash&quot;&gt;service httpd restart
service foreman-proxy restart&lt;/pre&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/1863495521498902012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/1863495521498902012' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1863495521498902012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1863495521498902012'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2014/06/replace-foreman-self-signed-certificate.html' title='Replace The Foreman Self Signed Certificate with a Trusted Certificate'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-1155582745820280628</id><published>2013-08-28T16:33:00.000-05:00</published><updated>2013-08-29T17:06:47.748-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="calc"/><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="iterate"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="loop"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Fun with Bash :: Sums</title><content type='html'>I frequently find the need to sum up long lists of numbers from the Bash command shell. The following is a nice bit of code that sums up the bytes contained in a series of files and prints out the each sum in GB.&lt;br /&gt;
&lt;br /&gt;
The current directory has files *-bytes.log that each contain a single column with a number of bytes on each row, example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;53824
247104
61776
53824
53824
53824
247104
53824
247104
542&lt;/pre&gt;
&lt;br /&gt;
The code contains an outer loop to iterate the files and an inner loop to process the contents of the files
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;for file in $(ls *-bytes.log); do
  sum=0;
  for num in $(cat $file); do
    let sum=$sum+$num;
  done
  echo &quot;$sum/1024/1024/1024&quot; | bc -l | xargs printf &quot;$file %1.2f GB\n&quot;;
done&lt;/pre&gt;
&lt;br /&gt;
This is an alternative approach using an inner while loop to read the sums rather than cat&#39;ing the file
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;for file in $(ls *-bytes.log); do
  sum=0;
  while read num; do
    let sum=$sum+$num;
  done &lt; $file
  echo &quot;$sum/1024/1024/1024&quot; | bc -l | xargs printf &quot;$file %1.2f GB\n&quot;;
done&lt;/pre&gt;
&lt;br /&gt;
Sample results&lt;br /&gt;
&lt;pre&gt;user1-bytes.log 3.81 GB
user2-bytes.log 4.75 GB
user3-bytes.log 1.40 GB
user4-bytes.log 2.03 GB
user5-bytes.log 5.01 GB
...
&lt;/pre&gt;
&lt;br /&gt;
I&#39;ve also found the following bit of code helpful in my $HOME/.bashrc to make quick calculations easy (this comes from a &lt;a href=&quot;http://www.cyberciti.biz/&quot; target=&quot;_blank&quot;&gt;nixCraft&lt;/a&gt; Facebook post:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;# nixCraft (on Facebook) calc recipe
# Usage: calc &quot;10+2&quot;
#   Pi:  calc &quot;scale=10; 4*a(1)&quot;
# Temperature: calc &quot;30 * 1.8 + 32&quot;
#              calc &quot;(86 - 32)/1.8&quot;
calc() { echo &quot;$*&quot; | bc -l; }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/1155582745820280628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/1155582745820280628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1155582745820280628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1155582745820280628'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2013/08/fun-with-bash-sums.html' title='Fun with Bash :: Sums'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-158662662497533427</id><published>2013-06-13T13:46:00.000-05:00</published><updated>2013-08-21T10:08:59.928-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="5.9"/><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="centos5"/><category scheme="http://www.blogger.com/atom/ns#" term="g++"/><category scheme="http://www.blogger.com/atom/ns#" term="gcc"/><category scheme="http://www.blogger.com/atom/ns#" term="gfortran"/><category scheme="http://www.blogger.com/atom/ns#" term="gnu"/><title type='text'>Building GCC 4.8.1 on CentOS 5.9</title><content type='html'>&lt;h3&gt;
References:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://verahill.blogspot.com/2012/07/compiling-gcc-471gfortran-471-on-centos.html&quot;&gt;http://verahill.blogspot.com/2012/07/compiling-gcc-471gfortran-471-on-centos.html&lt;/a&gt; - I borrowed heavily from Lindqvist post along with some of modulefile from the comment by Mark Dwyer
  &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dollarvar.blogspot.com/2013/03/building-gcc-48.html&quot;&gt;http://dollarvar.blogspot.com/2013/03/building-gcc-48.html&lt;/a&gt; - Borrowed additional modulefile bits from this post
  &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://gcc.gnu.org/install/configure.html&quot;&gt;http://gcc.gnu.org/install/configure.html&lt;/a&gt;
  &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://gcc.gnu.org/install/prerequisites.html&quot;&gt;http://gcc.gnu.org/install/prerequisites.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Build:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Install packages for dependencies (readline-devel is needed for guile build, dejagnu is needed for gcc make check)
&lt;pre class=&quot;brush:bash&quot;&gt;sudo yum install readline readline-devel guile guile-devel dejagnu expect
sudo yum -y install readline readline-devel guile guile-devel dejagnu expect
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Download and untar all the sources
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir -p ~/sources/gcc
cd ~/sources/gcc

gccver=4.8.1
gmpver=5.1.2
mpfrver=3.1.2
mpcver=1.0.1
binutilsver=2.23.2
libtoolver=2.4.2
libunistringver=0.9.3
libffiver=3.0.13
gcver=7.2d
autogenver=5.17.4
guilever=2.0.9
prefixroot=/share/apps/tools

wget http://www.netgull.com/gcc/releases/gcc-4.8.1/gcc-${gccver}.tar.bz2
wget ftp://ftp.gnu.org/gnu/gmp/gmp-${gmpver}.tar.bz2
wget http://mpfr.loria.fr/mpfr-current/mpfr-${mpfrver}.tar.bz2
wget http://www.multiprecision.org/mpc/download/mpc-${mpcver}.tar.gz
wget http://ftp.gnu.org/gnu/binutils/binutils-${binutilsver}.tar.bz2
wget http://mirror.sbb.rs/gnu/libtool/libtool-${libtoolver}.tar.gz
wget http://ftp.gnu.org/gnu/libunistring/libunistring-${libunistringver}.tar.gz
wget ftp://sourceware.org/pub/libffi/libffi-${libffiver}.tar.gz
wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${gcver}.tar.gz
wget http://ftp.gnu.org/gnu/autogen/rel5.17.4/autogen-${autogenver}.tar.gz
wget ftp://ftp.gnu.org/gnu/guile/guile-${guilever}.tar.gz

for file in *.{gz,bz2}; do echo tar xf $file; done

for dir in `find . -maxdepth 1 -type d | grep -v ^.$ | cut -d \/ -f2` ; do
  app=$(echo $dir | cut -f1 -d-);
  ver=$(echo $dir | cut -f2 -d-);
  mkdir -p ${prefixroot}/${app}/${ver} ;
done

mv gc-7.2 gc-7.2d
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build gmp
&lt;pre class=&quot;brush:bash&quot;&gt;cd gmp-${gmpver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/gmp/${gmpver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
  Version:           GNU MP 5.1.2
  Host type:         coreisbr-unknown-linux-gnu
  ABI:               64
  Install prefix:    /share/apps/tools/gmp/5.1.2
  Compiler:          gcc -std=gnu99
  Static libraries:  yes
  Shared libraries:  yes


Libraries have been installed in:
   /share/apps/gcc/gmp/5.1.2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
4. Build mpfr
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../mpfr-${mpfrver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/mpfr/${mpfrver} \
  --with-gmp=${prefixroot}/gmp/${gmpver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
Libraries have been installed in:
   /share/apps/gcc/mpfr/3.1.2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build mpc
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../mpc-${mpcver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/mpc/${mpcver} \
  --with-gmp=${prefixroot}/gmp/${gmpver} \
  --with-mpfr=${prefixroot}/mpfr/${mpfrver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
Libraries have been installed in:
   /share/apps/gcc/mpc/1.0.1/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build Binutils
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../binutils-${binutilsver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/binutils/${binutilsver}
make
make check
make install
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build libtool (make check runs for quite a while, upwards of an hour. Runs 126 tests.)
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../libtool-${libtoolver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/libtool/${libtoolver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
## ------------- ##
## Test results. ##
## ------------- ##

105 tests behaved as expected.
21 tests were skipped.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build libunistring
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../libunistring-${libunistringver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/libunistring/${libunistringver}
make
make check
make install
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build libffi
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../libffi-${libffiver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/libffi/${libffiver}
make
make check
make install

cd ${prefixroot}/libffi/${libffiver}
ln -s lib/libffi-${libffiver}/include
cd -
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
Libraries have been installed in:
   /share/apps/tools/libffi/3.0.13/lib/../lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build gc
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../gc-${gcver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/gc/${gcver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
Libraries have been installed in:
   /share/apps/tools/gc/7.2d/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build guile. This keeps blowing up with the error following the code. &lt;b&gt;CentOS base repo actually has the guile and guile-devel packages that are new enough to support autogen, so I used the package instead. Leaving this step for future reference.&lt;/b&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../guile-${guilever}
mkdir build
cd build
.././configure --prefix=${prefixroot}/guile/${guilever} \
   --with-libltdl-prefix=${prefixroot}/libtool/${libtoolver} \
   --with-libgmp-prefix=${prefixroot}/gmp/${gmpver} \
   --with-libunistring-prefix=${prefixroot}/libunistring/${libunistringver} \
   LDFLAGS=&quot;-L${prefixroot}/libtool/${libtoolver}/lib -L${prefixroot}/gmp/${gmpver}/lib -L${prefixroot}/libunistring/${libunistringver}/lib -L${prefixroot}/libffi/${libffiver}/lib -L${prefixroot}/gc/${gcver}/lib&quot; \
   CPPFLAGS=&quot;-I${prefixroot}/libtool/${libtoolver}/include -I${prefixroot}/libtool/${libtoolver}/include/libltdl -I${prefixroot}/libffi/${libffiver}/include -I${prefixroot}/gc/${gcver}/include -I${prefixroot}/gmp/${gmpver}/include&quot; \
   LIBFFI_CFLAGS=-I${prefixroot}/libffi/${libffiver}/include \
   LIBFFI_LIBS=-L${prefixroot}/libffi/${libffiver}/lib \
   BDW_GC_CFLAGS=-I${prefixroot}/gc/${gcver}/include \
   BDW_GC_LIBS=-L${prefixroot}/gc/${gcver}/lib
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
make[1]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build&#39;
Making all in lib
make[2]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
make  all-recursive
make[3]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
make[4]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
make[4]: Nothing to be done for `all-am&#39;.
make[4]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
make[3]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
make[2]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/lib&#39;
Making all in meta
make[2]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/meta&#39;
make[2]: Nothing to be done for `all&#39;.
make[2]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/meta&#39;
Making all in libguile
make[2]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/libguile&#39;
make  all-am
make[3]: Entering directory `/home/mhanby/sources/gcc/guile-2.0.9/build/libguile&#39;
  CC       libguile_2.0_la-finalizers.lo
../.././libguile/finalizers.c:167: error: static declaration of &#39;GC_set_finalizer_notifier&#39; follows non-static declaration
/share/apps/tools/gc/7.2d/include/gc/gc.h:177: error: previous declaration of &#39;GC_set_finalizer_notifier&#39; was here
make[3]: *** [libguile_2.0_la-finalizers.lo] Error 1
make[3]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/libguile&#39;
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build/libguile&#39;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mhanby/sources/gcc/guile-2.0.9/build&#39;
make: *** [all] Error 2
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build autogen
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../autogen-${autogenver}
mkdir build
cd build
.././configure --prefix=${prefixroot}/autogen/${autogenver}
make
make check
make install
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
------------------------------------------------------------------------
Configuration:

  Source code location:   ../.
  Compiler:               gcc -std=gnu99
  Compiler flags:         -g -O2
  Host System Type:       x86_64-unknown-linux-gnu
  Install path:           /share/apps/tools/autogen/5.17.4

  See config.h for further configuration information.
------------------------------------------------------------------------

Libraries have been installed in:
   /share/apps/tools/autogen/5.17.4/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Build gcc (make took approximately 2.5 hours to run on a system with a 2.7GHz Intel Xeon E5-2680, make check took about 3 hours)
&lt;pre class=&quot;brush:bash&quot;&gt;cd ../../gcc-${gccver}
mkdir build
cd build

OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${prefixroot}/gmp/${gmpver}/lib:${prefixroot}/mpc/${mpcver}/lib:${prefixroot}/mpfr/${mpfrver}/lib:${LD_LIBRARY_PATH}

.././configure \
  --prefix=${prefixroot}/gcc/${gccver} \
  --with-gmp=${prefixroot}/gmp/${gmpver} \
  --with-mpfr=${prefixroot}/mpfr/${mpfrver} \
  --with-mpc=${prefixroot}/mpc/${mpcver} \
  LD_FOR_TARGET=ld \
  AS_FOR_TARGET=as \
  --with-ld=${prefixroot}/binutils/${binutilsver}/bin/ld \
  --with-as=${prefixroot}/binutils/${binutilsver}/bin/as \
  --with-ar=${prefixroot}/binutils/${binutilsver}/bin/ar \
  AR_FOR_TARGET=ar

time make

#real 150m4.427s
#user 101m21.408s
#sys 12m54.047s

OLD_PATH=${PATH}
export PATH=/share/apps/tools/autogen/5.17.4/bin:${PATH}
time make -k check
make install

export PATH=${OLD_PATH}
export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;EXAMPLE OUTPUT
================================================
----------------------------------------------------------------------
Libraries have been installed in:
   /share/apps/tools/gcc/4.8.1/lib/../lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

----------------------------------------------------------------------
Libraries have been installed in:
   /share/apps/tools/gcc/4.8.1/lib/../lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR&#39;
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH&#39; environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH&#39; environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR&#39; linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf&#39;

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Create the module file (for &lt;a href=&quot;http://modules.sourceforge.net/&quot;&gt;Environment Modules support&lt;/a&gt;)
&lt;pre class=&quot;brush:ruby&quot;&gt;#%Module1.0####################################################################
##
## mymodule modulefile
##
## Sets up the 4.8.1 GCC compilation environment
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set subname [lrange [split $name - ] 0 0 ]

proc ModulesHelp { } {
  puts stderr &quot;\tThis module sets the environment for $name v$ver&quot;
}

module-whatis   &quot;Set environment variables to use $name version $ver&quot;

conflict compiler

set base /share/apps/tools
set gccdir $base/$subname/$ver
set binutilsdir $base/binutils/2.23.2
set gmpdir $base/gmp/5.1.2
set mpcdir $base/mpc/1.0.1
set mpfrdir $base/mpfr/3.1.2

## Add bin directories to the path
prepend-path PATH $gccdir/bin
prepend-path PATH $binutilsdir/bin

prepend-path LD_LIBRARY_PATH $mpfrdir/lib
prepend-path LD_LIBRARY_PATH $mpcdir/lib
prepend-path LD_LIBRARY_PATH $gmpdir/lib
prepend-path LD_LIBRARY_PATH $binutilsdir/lib
prepend-path LD_LIBRARY_PATH $binutilsdir/lib64
prepend-path LD_LIBRARY_PATH $gccdir/lib
prepend-path LD_LIBRARY_PATH $gccdir/lib64

prepend-path MANPATH $gccdir/share/man
prepend-path C_INCLUDE_PATH $gccdir/include
prepend-path CPLUS_INCLUDE_PATH $gccdir/include

setenv CC $gccdir/bin/gcc
setenv CXX $gccdir/bin/g++
setenv FC $gccdir/bin/gfortran

if { [ module-info mode load ] } {
  puts stderr &quot;Note: $name $ver environment loaded.&quot;
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/158662662497533427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/158662662497533427' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/158662662497533427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/158662662497533427'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2013/06/building-gcc-481-on-centos-59.html' title='Building GCC 4.8.1 on CentOS 5.9'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-1137639475889245551</id><published>2013-04-19T11:14:00.001-05:00</published><updated>2013-06-13T10:41:42.190-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="gromacs"/><category scheme="http://www.blogger.com/atom/ns#" term="icc"/><category scheme="http://www.blogger.com/atom/ns#" term="intel"/><category scheme="http://www.blogger.com/atom/ns#" term="openmpi"/><title type='text'>How To Compile Gromacs 4.6.1 with OpenMPI 1.6.4 on CentOS</title><content type='html'>I took the following notes while installing Gromacs 4.6.1 recently. Hopefully others will find them useful.

The software was compiled and installed on a CentOS 5.9 x86_64 containing QDR Infiniband. The system uses SGE (Grid Engine) as it&#39;s scheduler.

Intel compilers 13.1.1 were used to compile both OpenMPI and Gromacs.

&lt;h2&gt;Intel Compilers&lt;/h2&gt;
I used version 13.1.1 of the Intel compilers. I&#39;m including the module file here for reference

&lt;pre class=&quot;brush:ruby&quot;&gt;#%Module

set ver 13.1.1
set arch intel64

set root /share/apps/intel/parallel_studio_xe_2013_update3/composer_xe_2013.3.163
set ccroot /opt/intel/Compiler/$ver/$ccver
set fcroot /opt/intel/Compiler/$ver/$fcver
set mklroot $root/mkl

set msg &quot;This module adds Intel compilers v$ver to various paths&quot;

proc ModulesHelp { } {
   puts stderr $msg
}

module-whatis   $msg

setenv MKLROOT $mklroot
prepend-path MANPATH $root/man/en_US
prepend-path INTEL_LICENSE_FILE $root/licenses

prepend-path NLSPATH $root/compiler/lib/$arch/locale/en_US:$root/ipp/lib/$arch/locale/en_US:$root/mkl/lib/$arch/locale/en_US:$root/debugger/lib/$arch/locale/en_US

prepend-path LIBRARY_PATH $root/compiler/lib/$arch:$root/ipp/lib/$arch:$root/mkl/lib/$arch:$root/tbb/lib/$arch/gcc4.1
prepend-path MIC_LD_LIBRARY_PATH $root/compiler/lib/mic:$root/mkl/lib/mic:$root/tbb/lib/mic
prepend-path LD_LIBRARY_PATH $root/compiler/lib/$arch:$root/mpirt/lib/$arch:$root/ipp/lib/$arch:$root/mkl/lib/$arch:$root/tbb/lib/$arch/gcc4.1
prepend-path PATH $root/bin/$arch:$root/mpirt/bin/$arch:$root/bin/${arch}_mic:$root/debugger/gui/$arch

prepend-path CPATH $root/mkl/include:$root/tbb/include
prepend-path INCLUDE $root/mkl/include

prepend-path IPPROOT $root/ipp
prepend-path TBBROOT $root/tbb
prepend-path IDB_HOME $root/bin/$arch&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Build OpenMPI 1.6.4&lt;/h2&gt;
First, build the latest OpenMPI with the Intel compilers. This version of OpenMPI will reside in the Gromacs 4.6.1 install path.

&lt;ol&gt;
 &lt;li&gt;Create the install base directory
&lt;pre class=&quot;brush:bash&quot;&gt;cd /share/apps/gromacs/4.6.1/build
wget http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.4.tar.bz2
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Create the build script for Intel compilers: /share/apps/gromacs/4.6.1/build/build-openmpi-intel.sh
&lt;pre class=&quot;brush:bash&quot;&gt;#!/bin/sh
. /etc/profile.d/modules.sh
ver=1.6
rel=1.6.4
grover=4.6.1
src=&quot;openmpi-${rel}.tar.bz2&quot;
url=&quot;http://www.open-mpi.org/software/ompi/v${ver}/downloads/${src}&quot;
compiler=&quot;intel&quot;
basedir=&quot;/share/apps/gromacs/${grover}/openmpi&quot;
prefix=&quot;${basedir}/${rel}-${compiler}&quot;

if [ -d $prefix ]; then
  echo &quot;Installation directory already exists, exiting to prevent overwrite: $prefix&quot;;
  exit 1
else
  echo &quot;Verified installation directory does not exist: $prefix&quot;
fi

if [ ! -f $src ]; then
  echo &quot;Downloading source code from: $url&quot;;
  wget $url;
else
  echo &quot;Using existing source code: $src&quot;;
fi

if [ -d &quot;openmpi-${rel}&quot; ]; then
  echo &quot;Removing existing build directory ./openmpi-${rel}&quot;
  rm -rf openmpi-${rel};
fi

echo &quot;Extracting $src&quot;
tar -jxf $src
cd openmpi-${rel}

echo &quot;Building OpenMPI $rel for Intel compilers&quot;
echo &quot;Running configure&quot;
module purge
module load intel/intel-compilers-13.1.1
CC=icc CXX=icpc F77=ifort FC=ifort ./configure --with-sge --with-openib --prefix=$prefix --enable-static --enable-shared

make all install
module purge

cd ..
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Run the compile and install
&lt;pre class=&quot;brush:bash&quot;&gt;./build-openmpi-intel.sh | tee openmpi-1.6.4-intel.log
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Create the module file (based off of [http://www.levlafayette.com/node/145 this example]) in the Gromacs base directory
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir -p /share/apps/gromacs/4.6.1/modulefiles/gromacs-openmpi-intel
vim /share/apps/gromacs/4.6.1/modulefiles/gromacs-openmpi-intel/1.6.4
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush:ruby&quot;&gt;#%Module1.0#####################################################################
##
## $name modulefile
##
# /share/apps/gromacs/4.6.1/openmpi/1.6.4-intel/bin
# /share/apps/gromacs/4.6.1/openmpi/gromacs-openmpi-intel/1.6.4-intel/bin
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set subname [lrange [split $name - ] 0 0 ]
#set compiler [lrange [split $name - ] 1 1 ]
set compiler &quot;intel&quot;
set compilerver &quot;13.1.1&quot;

proc ModulesHelp { } {
  puts stderr &quot;\tThis module sets the envinronment for $name v$ver compiled\n\twith Intel v13.1.1 compilers&quot;
}

module-whatis   &quot;Set environment variables to use $name version $ver&quot;

if { $loading &amp;&amp; ![ is-loaded $compiler/$compilerver ] } {
  module load $compiler/$compilerver
}

set basedir /share/apps/gromacs/4.6.1/openmpi/${ver}-$compiler

prepend-path --delim &quot; &quot; CPPFLAGS -I$basedir/include
prepend-path --delim &quot; &quot; LDFLAGS -L$basedir/lib

prepend-path LD_LIBRARY_PATH $basedir/lib
prepend-path MANPATH $basedir/share/man
prepend-path PATH $basedir/bin

setenv  MPI_DIR         $basedir/
setenv  MPI_HOME        $basedir/
setenv  OPENMPI_ROOT    $basedir/
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Run a test
 &lt;ul&gt;
  &lt;li&gt;Create the input C file /share/apps/openmpi/build/mpi-helloworld.c
&lt;pre class=&quot;brush:c&quot;&gt;#include &amp;lt;stdio&amp;gt;
#include &amp;lt;string&amp;gt;
#include &amp;lt;stddef&amp;gt;
#include &amp;lt;stdlib&amp;gt;
#include &quot;mpi.h&quot;

main(int argc, char **argv ) {
    int rank, size;
    int buflen = 512;
    char name[buflen];
    
    MPI_Init(&amp;argc, &amp;argv);
    MPI_Comm_size(MPI_COMM_WORLD,&amp;size);
    MPI_Comm_rank(MPI_COMM_WORLD, &amp;rank);

    gethostname(name, buflen);
    
    printf( &quot;P rank %d of %d, host %s\n&quot;, rank, size, name);

    MPI_Finalize();
}
&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Compile mpi-helloworld.c
&lt;pre class=&quot;brush:c&quot;&gt;module load /share/apps/gromacs/4.6.1/modulefiles/gromacs-openmpi-intel/1.6.4
mpicc -o mpi-helloworld-intel mpi-helloworld.c
&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;run it as a job
&lt;pre class=&quot;brush:bash&quot;&gt;module purge
module load /share/apps/gromacs/4.6.1/modulefiles/gromacs-openmpi-intel/1.6.4
qsub -V -b y \
   -l h_rt=00:15:00 \
   -l vf=256M \
   -j y \
   -pe openmpi\* 8 \
   mpirun -n 8 /share/apps/openmpi/build/mpi-helloworld-intel  
&lt;/code&gt;&lt;/pre&gt;
  &lt;/ul&gt;
&lt;/ol&gt;

&lt;h2&gt;Build Gromacs 4.6.1&lt;/h2&gt;
Official Gromacs 4.6 &lt;a href=&quot;http://www.gromacs.org/Documentation/Installation_Instructions&quot;&gt;build instructions&lt;/a&gt;

They have changed dramatically from versions 4.5 and prior.

One requirement listed is that we need CMake version 2.8 or later. EPEL provides CMake 2.6.4, so we&#39;ll need to build CMake from scratch.

&lt;ol&gt;
 &lt;li&gt;Download the latest CMake from here: http://www.cmake.org/cmake/resources/software.html
&lt;pre class=&quot;brush:bash&quot;&gt;sudo mkdir /share/apps/cmake
sudo chown mhanby:atlab /share/apps/cmake
cd /share/apps/cmake
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.tar.gz
tar -zxf cmake-2.8.10.2-Linux-i386.tar.gz 
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Create the build directory and download the source
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir -p /share/apps/gromacs/4.6.1/build
cd /share/apps/gromacs/4.6.1/build
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.1.tar.gz
tar -zxf gromacs-4.6.1.tar.gz 
mkdir gromacs-4.6.1/build
cd gromacs-4.6.1/build
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;Create the module files
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir /share/apps/modulefiles/gromacs-intel
vim /share/apps/modulefiles/gromacs-intel/4.6.1
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush:ruby&quot;&gt;#%Module

set ver 4.6.1
set app &quot;Gromacs&quot;
set url &quot;http://gromacs.org/&quot;
set approot /share/apps/gromacs/$ver
set msg &quot;This module adds $app v$ver to various paths\nWebsite: $url\n\n&quot;

proc ModulesHelp { } {
   puts stderr $msg
}

module-whatis  $msg

module use --append $approot/modulefiles
module load intel/13.1.1
#module load $approot/modulefiles/gromacs-openmpi-intel/1.6.4
module load gromacs-openmpi-intel/1.6.4

setenv GROMACSHOME $approot
#setenv MKL_HOME $::env(MKLROOT)
prepend-path PATH $approot/bin
prepend-path LD_LIBRARY_PATH $approot/lib
prepend-path MANPATH $approot/man
prepend-path MODULEPATH $approot/modulefiles
prepend-path PKG_CONFIG_PATH $approot/lib/pkgconfig
&lt;/code&gt;&lt;/pre&gt;
 &lt;li&gt;The next steps will build single and double precision in serial and parallel
  &lt;ul&gt;
   &lt;li&gt;Serial single precision
   &lt;ol&gt;
      &lt;li&gt;Run cmake to configure the build
&lt;pre class=&quot;brush:bash&quot;&gt;module purge
module load gromacs-intel/4.6.1
export PATH=/share/apps/cmake/cmake-2.8.10.2-Linux-i386/bin:$PATH

cd /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
rm -rf *

cmake .. \
   -DCMAKE_C_COMPILER=icc \
   -DCMAKE_CXX_COMPILER=icpc \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DCMAKE_INSTALL_PREFIX=/share/apps/gromacs/4.6.1 \
   -DREGRESSIONTEST_DOWNLOAD=ON
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;View the configuration
&lt;pre class=&quot;brush:bash&quot;&gt;ccmake ..

 BUILD_SHARED_LIBS                ON
 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /share/apps/gromacs/4.6.1
 CMAKE_PREFIX_PATH
 CUDA_HOST_COMPILER               /share/apps/intel/parallel_studio_xe_2013_update3/composer_xe_2013.3.163/bin/intel64/icc
 GMX_CPU_ACCELERATION             SSE4.1
 GMX_DEFAULT_SUFFIX               ON
 GMX_DOUBLE                       OFF
 GMX_FFT_LIBRARY                  fftw3
 GMX_GPU                          OFF
 GMX_GSL                          OFF
 GMX_MPI                          OFF
 GMX_OPENMP                       ON
 GMX_QMMM_PROGRAM                 none
 GMX_THREAD_MPI                   ON
 GMX_X11                          OFF
 REGRESSIONTEST_DOWNLOAD          OFF                              
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;make
&lt;pre class=&quot;brush:bash&quot;&gt;make
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Run the tests
&lt;pre class=&quot;brush:bash&quot;&gt;make check
[ 70%] Built target gmx
[ 71%] Built target gmxfftw
[ 80%] Built target md
[ 92%] Built target gmxana
[ 92%] Built target editconf
[ 96%] Built target gmxpreprocess
[ 97%] Built target grompp
[ 97%] Built target pdb2gmx
[ 97%] Built target gmxcheck
[100%] Built target mdrun
[100%] Built target gmxtests
Test project /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
    Start 1: regressiontests/simple
1/5 Test #1: regressiontests/simple ...........   Passed   72.17 sec
    Start 2: regressiontests/complex
2/5 Test #2: regressiontests/complex ..........   Passed  868.76 sec
    Start 3: regressiontests/kernel
3/5 Test #3: regressiontests/kernel ...........   Passed  583.48 sec
    Start 4: regressiontests/freeenergy
4/5 Test #4: regressiontests/freeenergy .......   Passed  695.84 sec
    Start 5: regressiontests/pdb2gmx
5/5 Test #5: regressiontests/pdb2gmx ..........   Passed  379.29 sec

100% tests passed, 0 tests failed out of 5

Total Test time (real) = 2599.69 sec
[100%] Built target check
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Install
&lt;pre class=&quot;brush:bash&quot;&gt;make install

...
-- Installing: /share/apps/gromacs/4.6.1/lib/pkgconfig/libgmxana.pc
-- Installing: /share/apps/gromacs/4.6.1/bin/GMXRC
-- Installing: /share/apps/gromacs/4.6.1/bin/GMXRC.bash
-- Installing: /share/apps/gromacs/4.6.1/bin/GMXRC.zsh
-- Installing: /share/apps/gromacs/4.6.1/bin/GMXRC.csh
-- Installing: /share/apps/gromacs/4.6.1/bin/completion.csh
-- Installing: /share/apps/gromacs/4.6.1/bin/completion.bash
-- Installing: /share/apps/gromacs/4.6.1/bin/completion.zsh
-- Installing: /share/apps/gromacs/4.6.1/bin/demux.pl
-- Installing: /share/apps/gromacs/4.6.1/bin/xplor2gmx.pl
&lt;/code&gt;&lt;/pre&gt;
   &lt;/ol&gt;
   &lt;li&gt;Serial double precision (will append _d to applicable installed files, example, mdrun_d)
   &lt;ol&gt;
      &lt;li&gt;Run cmake to configure the build
&lt;pre class=&quot;brush:bash&quot;&gt;module purge
module load gromacs-intel/4.6.1
export PATH=/share/apps/cmake/cmake-2.8.10.2-Linux-i386/bin:$PATH

cd /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
rm -rf *

cmake .. \
   -DCMAKE_C_COMPILER=icc \
   -DCMAKE_CXX_COMPILER=icpc \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DGMX_DOUBLE=ON \
   -DCMAKE_INSTALL_PREFIX=/share/apps/gromacs/4.6.1 \
   -DREGRESSIONTEST_DOWNLOAD=ON
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;View the configuration
&lt;pre class=&quot;brush:bash&quot;&gt;ccmake ..

 BUILD_SHARED_LIBS                ON
 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /share/apps/gromacs/4.6.1
 CMAKE_PREFIX_PATH
 GMX_CPU_ACCELERATION             SSE4.1
 GMX_DEFAULT_SUFFIX               ON
 GMX_DOUBLE                       ON
 GMX_FFT_LIBRARY                  fftw3
 GMX_GPU                          OFF
 GMX_GSL                          OFF
 GMX_MPI                          OFF
 GMX_OPENMP                       ON
 GMX_QMMM_PROGRAM                 none
 GMX_THREAD_MPI                   ON
 GMX_X11                          OFF
 REGRESSIONTEST_DOWNLOAD          OFF
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;make
&lt;pre class=&quot;brush:bash&quot;&gt;make
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Run the tests
&lt;pre class=&quot;brush:bash&quot;&gt;make check

Test project /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
    Start 1: regressiontests/simple
1/5 Test #1: regressiontests/simple ...........   Passed    3.33 sec
    Start 2: regressiontests/complex
2/5 Test #2: regressiontests/complex ..........   Passed    6.80 sec
    Start 3: regressiontests/kernel
3/5 Test #3: regressiontests/kernel ...........   Passed   52.89 sec
    Start 4: regressiontests/freeenergy
4/5 Test #4: regressiontests/freeenergy .......   Passed    9.19 sec
    Start 5: regressiontests/pdb2gmx
5/5 Test #5: regressiontests/pdb2gmx ..........   Passed   22.82 sec

100% tests passed, 0 tests failed out of 5

Total Test time (real) =  95.08 sec
[100%] Built target check
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Install
&lt;pre class=&quot;brush:bash&quot;&gt;make install
&lt;/code&gt;&lt;/pre&gt;
  &lt;/ol&gt;
  &lt;li&gt;Parallel single precision (will append _mpi to applicable installed files, example, mdrun_mpi)
    &lt;ol&gt;
      &lt;li&gt;Run cmake to configure the build
&lt;pre class=&quot;brush:bash&quot;&gt;module purge
module load gromacs-intel/4.6.1
export PATH=/share/apps/cmake/cmake-2.8.10.2-Linux-i386/bin:$PATH

cd /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
rm -rf *

cmake .. \
   -DCMAKE_C_COMPILER=icc \
   -DCMAKE_CXX_COMPILER=icpc \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DGMX_MPI=ON \
   -DCMAKE_INSTALL_PREFIX=/share/apps/gromacs/4.6.1 \
   -DREGRESSIONTEST_DOWNLOAD=ON
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;View the configuration
&lt;pre class=&quot;brush:bash&quot;&gt;ccmake ..

 BUILD_SHARED_LIBS                ON
 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /share/apps/gromacs/4.6.1
 CMAKE_PREFIX_PATH
 CUDA_HOST_COMPILER               /share/apps/intel/parallel_studio_xe_2013_update3/composer_xe_2013.3.163/bin/intel64/icc
 GMX_CPU_ACCELERATION             SSE4.1
 GMX_DEFAULT_SUFFIX               ON
 GMX_DOUBLE                       OFF
 GMX_FFT_LIBRARY                  fftw3
 GMX_GPU                          OFF
 GMX_GSL                          OFF
 GMX_MPI                          ON
 GMX_OPENMP                       ON
 GMX_QMMM_PROGRAM                 none
 GMX_THREAD_MPI                   OFF
 GMX_X11                          OFF
 MPI_EXTRA_LIBRARY                /usr/lib64/librdmacm.so;/usr/lib64/libibverbs.so;/usr/lib64/librt.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libdl.so;/usr/lib64/libm.so;/usr/lib64/librt.so;
 MPI_LIBRARY                      /share/apps/gromacs/4.6.1/openmpi/1.6.4-intel/lib/libmpi.so
 REGRESSIONTEST_DOWNLOAD          OFF
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;make
&lt;pre class=&quot;brush:bash&quot;&gt;make
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Run the tests
&lt;pre class=&quot;brush:bash&quot;&gt;make check

Test project /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
    Start 1: regressiontests/simple
1/5 Test #1: regressiontests/simple ...........   Passed   22.68 sec
    Start 2: regressiontests/complex
2/5 Test #2: regressiontests/complex ..........   Passed   29.49 sec
    Start 3: regressiontests/kernel
3/5 Test #3: regressiontests/kernel ...........   Passed  222.08 sec
    Start 4: regressiontests/freeenergy
4/5 Test #4: regressiontests/freeenergy .......   Passed   19.17 sec
    Start 5: regressiontests/pdb2gmx
5/5 Test #5: regressiontests/pdb2gmx ..........   Passed   75.39 sec

100% tests passed, 0 tests failed out of 5

Total Test time (real) = 368.83 sec
[100%] Built target check
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Install
&lt;pre class=&quot;brush:bash&quot;&gt;make install
&lt;/code&gt;&lt;/pre&gt;
    &lt;/ol&gt;
    &lt;li&gt;Parallel double precision (will append _mpi_d to applicable installed files, example, mdrun_mpi_d)
    &lt;ol&gt;
      &lt;li&gt;Run cmake to configure the build
&lt;pre class=&quot;brush:bash&quot;&gt;module purge
module load gromacs-intel/4.6.1
export PATH=/share/apps/cmake/cmake-2.8.10.2-Linux-i386/bin:$PATH

cd /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
rm -rf *

cmake .. \
   -DCMAKE_C_COMPILER=icc \
   -DCMAKE_CXX_COMPILER=icpc \
   -DGMX_BUILD_OWN_FFTW=ON \
   -DGMX_MPI=ON \
   -DGMX_DOUBLE=ON \
   -DCMAKE_INSTALL_PREFIX=/share/apps/gromacs/4.6.1 \
   -DREGRESSIONTEST_DOWNLOAD=ON
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;View the configuration
&lt;pre class=&quot;brush:bash&quot;&gt;ccmake ..

 BUILD_SHARED_LIBS                ON 
 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /share/apps/gromacs/4.6.1
 CMAKE_PREFIX_PATH
 GMX_CPU_ACCELERATION             SSE4.1
 GMX_DEFAULT_SUFFIX               ON
 GMX_DOUBLE                       ON
 GMX_FFT_LIBRARY                  fftw3
 GMX_GPU                          OFF
 GMX_GSL                          OFF
 GMX_MPI                          ON
 GMX_OPENMP                       ON
 GMX_QMMM_PROGRAM                 none
 GMX_THREAD_MPI                   OFF
 GMX_X11                          OFF
 MPI_EXTRA_LIBRARY                /usr/lib64/librdmacm.so;/usr/lib64/libibverbs.so;/usr/lib64/librt.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libdl.so;/usr/lib64/libm.so;/usr/lib64/librt.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so                       
 MPI_LIBRARY                      /share/apps/gromacs/4.6.1/openmpi/1.6.4-intel/lib/libmpi.so
 REGRESSIONTEST_DOWNLOAD          OFF
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;make
&lt;pre class=&quot;brush:bash&quot;&gt;make
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Run the tests
&lt;pre class=&quot;brush:bash&quot;&gt;make check

Test project /share/apps/gromacs/4.6.1/build/gromacs-4.6.1/build
    Start 1: regressiontests/simple
1/5 Test #1: regressiontests/simple ...........   Passed   22.65 sec
    Start 2: regressiontests/complex
2/5 Test #2: regressiontests/complex ..........   Passed   32.25 sec
    Start 3: regressiontests/kernel
3/5 Test #3: regressiontests/kernel ...........   Passed  232.23 sec
    Start 4: regressiontests/freeenergy
4/5 Test #4: regressiontests/freeenergy .......   Passed   21.13 sec
    Start 5: regressiontests/pdb2gmx
5/5 Test #5: regressiontests/pdb2gmx ..........   Passed   82.39 sec

100% tests passed, 0 tests failed out of 5

Total Test time (real) = 390.67 sec
[100%] Built target check
&lt;/code&gt;&lt;/pre&gt;
      &lt;li&gt;Install
&lt;pre class=&quot;brush:bash&quot;&gt;make install
&lt;/code&gt;&lt;/pre&gt;
    &lt;/ol&gt;
    &lt;/ul&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/1137639475889245551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/1137639475889245551' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1137639475889245551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1137639475889245551'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2013/04/how-to-compile-gromacs-461-with-openmpi.html' title='How To Compile Gromacs 4.6.1 with OpenMPI 1.6.4 on CentOS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-3775888257232709373</id><published>2013-02-27T12:02:00.002-06:00</published><updated>2013-02-27T12:02:25.393-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="nexus 7"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Ubuntu 13.04 on Google Nexus 7</title><content type='html'>Canonical has recently &lt;a href=&quot;http://reviews.cnet.com/8301-19736_7-57570119-251/canonical-cracks-the-slate-code-brings-ubuntu-to-nexus-tablets/&quot;&gt;released a developer preview of Ubuntu 13.04&lt;/a&gt; for Google Nexus devices.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I figured, what the heck, may as well try it out on my Google Nexus 7. Following &lt;a href=&quot;https://wiki.ubuntu.com/Nexus7/Installation&quot;&gt;these instructions&lt;/a&gt;, the installation went off without a hitch.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I used a laptop running Ubuntu 12.10 to perform the installation.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Following the installation, I ran into the issue during &lt;a href=&quot;https://wiki.ubuntu.com/Nexus7/Installation#First_boot&quot;&gt;First Boot&lt;/a&gt; where the on screen keyboard didn&#39;t work. I don&#39;t have an OTG adapter cable, but do have a Bluetooth Logitech Android tablet keyboard. As stated in the instructions, the Bluetooth keyboard doesn&#39;t work during first boot.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That is, initially :-)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I got around this by clicking the Gear icon in the upper right corner and clicking System Settings -&amp;gt; Bluetooth. I clicked the add button and put the keyboard into connect mode. The keyboard successfully synced with the tablet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Great, however now I couldn&#39;t find a way to close the System Settings window. I could move it around, but couldn&#39;t get the focus away and back to the First Boot screen.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
No problem, click the Gear icon again and select restart. Upon reboot, the Bluetooth keyboard works fine on the First Boot windows.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/3775888257232709373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/3775888257232709373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3775888257232709373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3775888257232709373'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2013/02/ubuntu-1304-on-google-nexus-7.html' title='Ubuntu 13.04 on Google Nexus 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-1239798433325970632</id><published>2013-01-23T09:46:00.001-06:00</published><updated>2013-01-23T09:46:40.895-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="batch"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="iterate"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="loop"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>How To: Recursively Create Numeric Directories</title><content type='html'>I was asked by a colleague how to do the following:

&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
I have a root folder that I need to create a directory based on job numbers.

From the root folder, I&#39;d like to create the following:

1000
1000\1100
1000\1100\1101
1000\1100\1102

all the way up to 

9000\9900\9999

To explain, I&#39;ll use the 5000 folder:

I would need:
5000
5000\5100
5000\5100\5101 through 5000\5100\5199
5000\5200
5000\5200\5201 through 5200\5200\5299
and so on.

What would be the easiest way?
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The solution isn&#39;t a big deal for anyone familiar with scripting, but I figured I&#39;d share here in case other none coders need help with a similar problem.&lt;br /&gt;
&lt;br /&gt;
I wasn&#39;t sure whether they were on a Windows computer (figured most likely based on the slashes) or Linux / Mac, so I provided both a Bash and Windows command shell solutions.&lt;br /&gt;
&lt;br /&gt;
There are any number of ways to approach this, I chose nested for loops.&lt;br /&gt;
&lt;h4&gt;
First the Bash solution:
&lt;/h4&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;for x in {1..9}; do
  mkdir ${x}000
  cd ${x}000
  for y in {1..9}; do
    mkdir ${x}${y}00
    cd ${x}${y}00
    for ((z=1; z&amp;lt;=99; z+=1)); do
      mkdir `printf &quot;%s%s%02d&quot; $x $y $z`
    done
    cd ..
  done
  cd ..
done
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;
Now the Windows solution:
&lt;/h4&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;setlocal EnableDelayedExpansion
for /l %x in (1, 1, 9) do (
  mkdir %x000
  cd %x000
  for /l %y in (1, 1, 9) do (
    mkdir %x%y00
    cd %x%y00
    for /l %z in (1, 1, 99) do (
      if %z LSS 10 (
        mkdir %x%y0%z
      ) else (
        mkdir %x%y%z
      )
    )
    cd ..
  )
  cd ..  
)
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/1239798433325970632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/1239798433325970632' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1239798433325970632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/1239798433325970632'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2013/01/how-to-recursively-create-numeric.html' title='How To: Recursively Create Numeric Directories'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-7126682386985927731</id><published>2012-06-20T11:59:00.001-05:00</published><updated>2012-06-20T11:59:35.223-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="diff"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora 17"/><category scheme="http://www.blogger.com/atom/ns#" term="firewall builder"/><category scheme="http://www.blogger.com/atom/ns#" term="fwbuilder"/><category scheme="http://www.blogger.com/atom/ns#" term="patch"/><category scheme="http://www.blogger.com/atom/ns#" term="rpm"/><category scheme="http://www.blogger.com/atom/ns#" term="rpmbuild"/><category scheme="http://www.blogger.com/atom/ns#" term="spec"/><category scheme="http://www.blogger.com/atom/ns#" term="ssize_t"/><category scheme="http://www.blogger.com/atom/ns#" term="ThreadTools.h"/><title type='text'>Build Firewall Builder &#39;FWbuilder&#39; 5.1.0 for Fedora 17</title><content type='html'>Howdy,

&lt;a href=&quot;http://www.fwbuilder.org/&quot;&gt;FirewallBuilder&lt;/a&gt; released version 5.1.0 without providing an officially built rpm for Fedora 17.

This post will build an rpm for Fedora 17 using the &lt;a href=&quot;http://sourceforge.net/projects/fwbuilder/files/Current_Packages/5.1.0/fwbuilder-5.1.0.3599-1.fc16.src.rpm/download&quot;&gt;src rpm for Fedora 16&lt;/a&gt;

If you need help configuring the rpmbuild environment, start &lt;a href=&quot;http://fedoraproject.org/wiki/How_to_create_an_RPM_package#Introduction&quot;&gt;here&lt;/a&gt;.

First, download the &lt;a href=&quot;http://sourceforge.net/projects/fwbuilder/files/Current_Packages/5.1.0/fwbuilder-5.1.0.3599-1.fc16.src.rpm/download&quot;&gt;fwbuilder-5.1.0.3599-1.fc16.src.rpm&lt;/a&gt; file to your local directory.

Next, extract the src.rpm

&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ cd ~/tmp/fwbuilder
$ rpm2cpio fwbuilder-5.1.0.3599-1.fc16.src.rpm | cpio -idvm
$ mv fwbuilder-5.1.0.3599.tar.gz ~/rpmbuild/SOURCES/
$ mv fwbuilder-5.1.0.3599.spec ~/rpmbuild/SPECS/
&lt;/code&gt;&lt;/pre&gt;

A patch file is required due to the following build error:
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;../fwbuilder/uint128.h: In member function &#39;std::string uint128::to_string() const&#39;:
../fwbuilder/uint128.h:469:95: warning: format &#39;%lX&#39; expects argument of type &#39;long unsigned int&#39;, but argument 3 has type &#39;long long unsigned int&#39; [-Wformat]
../fwbuilder/uint128.h:469:95: warning: format &#39;%lX&#39; expects argument of type &#39;long unsigned int&#39;, but argument 4 has type &#39;long long unsigned int&#39; [-Wformat]
../fwbuilder/uint128.h:471:58: warning: format &#39;%lX&#39; expects argument of type &#39;long unsigned int&#39;, but argument 3 has type &#39;long long unsigned int&#39; [-Wformat]
In file included from ThreadTools.cpp:31:0:
../fwbuilder/ThreadTools.h:168:5: error: &#39;ssize_t&#39; does not name a type
ThreadTools.cpp:182:82: error: no &#39;ssize_t libfwbuilder::TimeoutCounter::read(int, void*, size_t) const&#39; member function declared in class &#39;libfwbuilder::TimeoutCounter&#39;
make[4]: *** [.obj/ThreadTools.o] Error 1
&lt;/code&gt;&lt;/pre&gt;

The patch was built using the following diff (patch credit &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674349&quot;&gt;debian bug 674349&lt;/a&gt;)
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ diff -u src/libfwbuilder/src/fwbuilder/ThreadTools.h.orig src/libfwbuilder/src/fwbuilder/ThreadTools.h &gt; ~/rpmbuild/SOURCES/fwbuilder-5.1.0.3599.ssize_t.patch
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;--- src/libfwbuilder/src/fwbuilder/ThreadTools.h.orig 2012-06-20 11:31:12.029364056 -0500
+++ src/libfwbuilder/src/fwbuilder/ThreadTools.h 2012-06-20 11:09:36.000000000 -0500
@@ -31,6 +31,7 @@
 
 #include &lt;time.h&gt; //for time_t definition
 #include &lt;pthread.h&gt;
+#include &lt;unistd.h&gt;
 
 #include &lt;string&gt;
 #include &lt;queue&gt;
&lt;/code&gt;&lt;/pre&gt;

Either run through the diff to generate the patch file or copy and paste the above diff into the new patch file ~/rpmbuild/SOURCES/fwbuilder-5.1.0.3599.ssize_t.patch

Now edit the fwbuilder-5.1.0.3599.spec file to include the new patch file
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;--- fwbuilder-5.1.0.3599.spec.orig 2012-03-22 04:17:55.000000000 -0500
+++ fwbuilder-5.1.0.3599.spec 2012-06-20 11:51:09.901734348 -0500
@@ -20,6 +20,7 @@
 Group:          %{guigroup}
 Url:            http://www.fwbuilder.org/
 Source:         http://prdownloads.sourceforge.net/fwbuilder/%{name}-%{version}.tar.gz
+Patch1:         fwbuilder-5.1.0.3599.ssize_t.patch
 Packager:       Vadim Kurland &lt;vadim@fwbuilder.org&gt;
 
 Buildroot:      %{_tmppath}/%{name}-%{version}-root
@@ -48,6 +49,7 @@
 
 %prep
 %setup 
+%patch1 -p0
 ./autogen.sh
 
 %build

&lt;/code&gt;&lt;/pre&gt;

Then run the build
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ cd ~/rpmbuild/SPECS
$ rpmbuild -ba fwbuilder-5.1.0.3599.spec
&lt;/code&gt;&lt;/pre&gt;

The result is the rpm containing
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ rpm -qpl ../RPMS/x86_64/fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64.rpm |more
/usr/bin/fwb_iosacl
/usr/bin/fwb_ipf
/usr/bin/fwb_ipfw
/usr/bin/fwb_ipt
/usr/bin/fwb_pf
/usr/bin/fwb_pix
/usr/bin/fwb_procurve_acl
/usr/bin/fwbedit
/usr/bin/fwbuilder
/usr/share/applications/fwbuilder.desktop
/usr/share/doc/fwbuilder-5.1.0.3599
...
&lt;/code&gt;&lt;/pre&gt;

Install the rpm using yum
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ sudo yum install ../RPMS/x86_64/fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64.rpm 
Loaded plugins: fs-snapshot, langpacks, presto, refresh-packagekit
Examining ../RPMS/x86_64/fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64.rpm: fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64
Marking ../RPMS/x86_64/fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64.rpm to be installed
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package fwbuilder.x86_64 0:5.1.0.3599-1.fc17.uabeng will be installed
--&gt; Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package         Arch         Version                         Repository                                        Size
=====================================================================================================================
Installing:
 fwbuilder       x86_64       5.1.0.3599-1.fc17.uabeng        /fwbuilder-5.1.0.3599-1.fc17.uabeng.x86_64        36 M

Transaction Summary
=====================================================================================================================
Install  1 Package
&lt;/code&gt;&lt;/pre&gt;

Hope this helps other FC17 FWbuilder users out there!</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/7126682386985927731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/7126682386985927731' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/7126682386985927731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/7126682386985927731'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/06/build-firewall-builder-fwbuilder-510.html' title='Build Firewall Builder &#39;FWbuilder&#39; 5.1.0 for Fedora 17'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-6785588417953789239</id><published>2012-06-01T12:02:00.002-05:00</published><updated>2012-06-25T12:42:31.902-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="btrfs"/><category scheme="http://www.blogger.com/atom/ns#" term="ext4"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora 17"/><category scheme="http://www.blogger.com/atom/ns#" term="fs-snapshot"/><category scheme="http://www.blogger.com/atom/ns#" term="fsck"/><category scheme="http://www.blogger.com/atom/ns#" term="selinux"/><category scheme="http://www.blogger.com/atom/ns#" term="yum"/><title type='text'>HowTo: Converting EXT4 to BTRFS in Fedora 17</title><content type='html'>This HowTo documents the steps I used on a &lt;a href=&quot;https://fedoraproject.org/&quot;&gt;Fedora 17&lt;/a&gt; x86_64 test machine to convert the root file system from Ext4 to Btrfs.&lt;br /&gt;
&lt;br /&gt;
Anaconda (Fedora installer) doesn&#39;t support the creation or manipulation of Btrfs file systems in the graphical installer. Support for this is &lt;a href=&quot;http://www.h-online.com/open/news/item/Fedora-puts-back-Btrfs-deployment-yet-again-1436704.html&quot;&gt;slated for Fedora 18&lt;/a&gt;, at which time, Btrfs may become the default file system!&lt;br /&gt;
&lt;br /&gt;
It is possible, however, to create Btrfs file systems at install time via &lt;a href=&quot;http://fedoraproject.org/wiki/Anaconda/Kickstart#btrfs&quot;&gt;Kickstart&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The virtual machine was installed with &lt;a href=&quot;https://fedoraproject.org/&quot;&gt;Fedora 17&lt;/a&gt; x86_64 using default partitioning (LVM and Ext4) and selecting the Desktop profile.&lt;br /&gt;
&lt;br /&gt;If possible, create the partitions without LVM. (see section at the bottom for an example of this and UUID)&lt;br /&gt;
&lt;br /&gt;
In the examples, the root file system is a logical volume: /dev/mapper/vg_f17vm-lv_root&lt;br /&gt;
&lt;br /&gt;
Following the install and the initial boot, I rebooted using the &lt;a href=&quot;http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/x86_64/Fedora-17-x86_64-Live-Desktop.iso&quot;&gt;Fedora 17 x86_64 Live CD&lt;/a&gt; and chose the option to &lt;b&gt;Try Fedora&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
I initially tried to perform the conversion using the Fedora 17 DVD and rescue mode, however the btrfs-convert utility isn&#39;t included. The live CD, however, includes the Btrfs utilities.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Convert EXT4 root&lt;/h3&gt;
All of the steps are performed using the terminal, so open a Gnome Terminal and SU to root:&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;$ su -
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Run fsck on the file system&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# fsck.ext4 -f /dev/mapper/vg_f17vm-lv_root
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Convert from ext4 to btrfs. The metadata stage can take a while on a large populated file system (on an 1.5TB ext4 file system with approx 500GB of data, a good mix of large and small files, this step took about 1.5 hours)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# btrfs-convert /dev/mapper/vg_f17vm-lv_root

creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Mount the freshly converted btrfs root file system so that we can make some modifications (fstab, SELinux)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# mkdir /mnt/btrfs
# mount -t btrfs /dev/mapper/vg_f17vm-lv_root /mnt/btrfs
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Edit fstab to change the root file system from ext4 to btrfs
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# vi /mnt/btrfs/etc/fstab

#/dev/mapper/vg_f17vm-lv_root              ext4   defaults    1 1
/dev/mapper/vg_f17vm-lv_root              btrfs   defaults    1 1
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Force the system to automatically relabel the SELinux context for the root file system during boot.&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# touch /mnt/btrfs/.autorelabel
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt; In my test, the Fedora 17 system would hang with systemd library permissions errors prior to getting to the SELinux auto relabel step.&lt;br /&gt;
&lt;br /&gt;
To work around this, I rebooted back into the Live CD and change the SELinux policy to &quot;permissive&quot; from &quot;enforcing&quot;. During the next boot, the permission errors went by and then the SELinux autorelabel ran to completion.
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# vi /mnt/btrfs/etc/selinux/config

#SELINUX=enforcing
SELINUX=permissive

&lt;/code&gt;&lt;/pre&gt;
The Btrfs conversion process created a subvolume of the old ext4 file system. The following commands mount the subvolume and file system, demonstrating the power of Btrfs.&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# mkdir /mnt/{ext2_saved,ext4}
# mount -t btrfs -o subvol=ext2_saved /dev/mapper/vg_f17vm-lv_root /mnt/ext2_saved
# mount -t ext4 -o loop,ro /mnt/ext2_saved/image /mnt/ext4
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The contents of the ext4 and btrfs mounts should be identical, sans the changes made above to fstab and config.&lt;br /&gt;
&lt;br /&gt;
It&#39;s possible to roll back the conversion by first unmounting the file systems and then rolling it back using the -r switch&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# umount /dev/mapper/vg_f17vm-lv_root
# btrfs-convert -r /dev/mapper/vg_f17vm-lv_root
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
If you decide to stay with btrfs, you can delete the subvolume snapshot of the original ext4 system
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# btrfs subvolume delete /mnt/btrfs/ext2_saved
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Reboot into the installed OS and the system should perform the relabel and then come up with your shiny new btrfs file system.&lt;br /&gt;
&lt;br /&gt;
To make things really cool, install the&amp;nbsp;&lt;a href=&quot;http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Plugin_Descriptions.html&quot;&gt;yum-plugin-fs-snapshot&lt;/a&gt;&amp;nbsp;Yum plugin. This plugin will create a btrfs subvolume of your root file system prior to installing updates. The end result, you can roll back from yum updates. Test that you can mount the snapshot of the ext4 file system&lt;br /&gt;
&lt;br /&gt;
Once the system is up and running, don&#39;t forget to set the SELinux policy back to &quot;enforcing&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Issues:&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;It appears that some of the systemd services attempt to start prior to the SELinux .autorelabel step. This results in permission errors that prevent the system from booting. Temporarily change the SELinux policy to &quot;permissive&quot; to work past this.&lt;/li&gt;
&lt;li&gt;During boot, you may see errors logged by the systemd-fsck service failing for lv_root due to missing fsck.btrfs. I suspect that the btrfs-progs rpm failed to create a symlink of fsck.btrf pointing to /usr/sbin/btrfsck&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;systemd-fsck[858]: fsck: fsck.btrfs: not found
systemd-fsck[858]: fsck: error 2 while executing fsck.btrfs for&amp;nbsp;/dev/mapper/vg_f17vm-lv_root&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;Convert Luks Encrypted EXT4 home&lt;/h3&gt;
If your file system is encrypted with Luks, you&#39;ll have the additional step of decrypting the file system prior to running the conversion
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# cryptsetup luksOpen /dev/mapper/vg_f17vm-lv_home luks_home
# fsck.ext4 -f /dev/mapper/luks_home
# btrfs-convert /dev/mapper/luks_home

creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;Converting Non LVM Ext4 and UUID in /etc/fstab&lt;/h3&gt;
If you don&#39;t use LVM (recommended based on everything I&#39;ve ready, since it&#39;s not needed for btrfs), your /etc/fstab may mount the partitions using the UUID. After converting the file system to btrfs, the UUID will change.&lt;br /&gt;
&lt;br \&gt;
These steps demonstrate how to convert the root file syste, a non LVM ext4 partition, /dev/sda2.
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# fsck.ext4 -f /dev/sda2
# btrfs-convert /dev/sda2

creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.
&lt;/code&gt;&lt;/pre&gt;
Identify the UUID using blkid (can also look under /dev/disk/by-uuid
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# blkid /dev/sda2

/dev/sda2: UUID=&quot;56d1e02b-3120-44c3-b8f8-d3289012e447&quot; UUID_SUB=&quot;13f7b26b-42b1-41bb-a9dc-c928ad033f6d&quot; TYPE=&quot;btrfs&quot; 

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# mkdir /mnt/btrfs
# mount -t btrfs /dev/sda2 /mnt/btrfs

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Edit fstab to change the root file system from ext4 to btrfs and replace the UUID with the new UUID
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# vi /mnt/btrfs/etc/fstab

#UUID=e14bd8d6-ac8a-4f15-8169-f0a9bdf4b69e /                       ext4    defaults        1 1
UUID=56d1e02b-3120-44c3-b8f8-d3289012e447 /                       btrfs    defaults        1 1
UUID=f4cdf95d-66eb-4428-960d-23b289ffb63e /boot                   ext4    defaults        1 2
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Chroot to the real root file system and update grub.cfg using grub2-mkconfig
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# mount -o bind /dev /mnt/btrfs/dev
# mount -o bind /proc /mnt/btrfs/proc
# mount -o bind /sys /mnt/btrfs/sys
# mount /dev/sda1 /mnt/btrfs/boot

# chroot /mnt/btrfs

# grub2-mkconfig -o /boot/grub2/grub.cfg 

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.4.3-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.4.3-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.3.4-5.fc17.x86_64
Found initrd image: /boot/initramfs-3.3.4-5.fc17.x86_64.img
Warning: Please don&#39;t use old title `Fedora Linux, with Linux 3.3.4-5.fc17.x86_64&#39; for GRUB_DEFAULT, use `Advanced options for Fedora Linux&gt;Fedora Linux, with Linux 3.3.4-5.fc17.x86_64&#39; (for versions before 2.00) or `gnulinux-advanced-/dev/sda2&gt;gnulinux-3.3.4-5.fc17.x86_64-advanced-/dev/sda2&#39; (for 2.00 or later)
done
&lt;/code&gt;&lt;/pre&gt;
Exit out of the chroot and unmount the file systems
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;# exit
# umount /mnt/btrfs/boot
# umount /mnt/btrfs/dev
# umount /mnt/btrfs/proc
# umount /mnt/btrfs/sys
# umount /mnt/btrfs

&lt;/pre&gt;
&lt;br /&gt;
Reboot and you should be good to go. The selinux relabeling can take a while!
&lt;h3&gt;References:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3&quot;&gt;https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://btrfs.wiki.kernel.org/index.php/Getting_started&quot;&gt;https://btrfs.wiki.kernel.org/index.php/Getting_started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Plugin_Descriptions.html&quot;&gt;http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Plugin_Descriptions.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://fedoraproject.org/wiki/Anaconda/Kickstart#btrfs&quot;&gt;http://fedoraproject.org/wiki/Anaconda/Kickstart#btrfs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.h-online.com/open/news/item/Fedora-puts-back-Btrfs-deployment-yet-again-1436704.html&quot;&gt;http://www.h-online.com/open/news/item/Fedora-puts-back-Btrfs-deployment-yet-again-1436704.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://forums.fedoraforum.org/showthread.php?t=246520&quot;&gt;Good HowTo initially created for Fedora 13&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/6785588417953789239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/6785588417953789239' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6785588417953789239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6785588417953789239'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/06/howto-converting-ext4-to-btrfs-in.html' title='HowTo: Converting EXT4 to BTRFS in Fedora 17'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-2417059583632464901</id><published>2012-05-04T17:42:00.001-05:00</published><updated>2012-05-04T17:42:19.351-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="dell"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Script to Query Dell Warranty Status</title><content type='html'>I&#39;m sure there are more elegant ways of obtaining the warranty status for your Dell hardware, but none-the-less, here&#39;s a Ruby script I wrote that does just that :-)&lt;br /&gt;
&lt;br /&gt;
Script: &lt;a href=&quot;https://github.com/flakrat/misc-scripts/blob/master/query_dell_st/lib/query_dell_st.rb&quot;&gt;query_dell_st.rb&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The script currently has two modes, single lookup and batch lookup.&lt;br /&gt;
&lt;br /&gt;
Single lookup takes two arguments:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;--host &lt;i&gt;HOSTNANE&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;--svctag &lt;i&gt;SERVICE_TAG&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
Bulk requires only a single argument pointing to an input file containing a single entry &quot;HOSTNAME SERVICE_TAG&quot; per line for each device.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;--file &lt;i&gt;FILE&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Example single lookup:&lt;/b&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ ./query_dell_st.rb --svctag GT7D8P1 --host lin-srv01
Host: lin-srv01
 Model: PowerEdge R410
 Service Tag: GT7D8P1
 Warranty Exp: 617 days left

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Over the next few days I&#39;ll add more features (CSV and tab delimited output, for example) as well as address bugs and error handling.&lt;br /&gt;
&lt;br /&gt;
Hopefully the script is useful to others.</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/2417059583632464901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/2417059583632464901' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/2417059583632464901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/2417059583632464901'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/05/script-to-query-dell-warranty-status.html' title='Script to Query Dell Warranty Status'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8620876881333459177</id><published>2012-04-13T13:53:00.000-05:00</published><updated>2012-04-13T13:53:28.003-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="centos 6"/><category scheme="http://www.blogger.com/atom/ns#" term="centos6"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="gconftool"/><category scheme="http://www.blogger.com/atom/ns#" term="gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="greeter"/><category scheme="http://www.blogger.com/atom/ns#" term="login"/><category scheme="http://www.blogger.com/atom/ns#" term="rhel"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL 6"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL6"/><title type='text'>HowTo: Disable User List on RHEL6 / CentOS6 Login Window</title><content type='html'>Quick bit of code to disable the user list on the RHEL6 / CentOS6 login screen.

&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gdm/simple-greeter/disable_user_list true
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Useful Gconf References:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://live.gnome.org/GDM/2.22/Configuration&quot;&gt;http://live.gnome.org/GDM/2.22/Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://svn.gnome.org/viewvc/gdm/trunk/gui/simple-greeter/gdm-simple-greeter.schemas.in?view=markup&quot;&gt;http://svn.gnome.org/viewvc/gdm/trunk/gui/simple-greeter/gdm-simple-greeter.schemas.in?view=markup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8620876881333459177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8620876881333459177' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8620876881333459177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8620876881333459177'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/04/howto-disable-user-list-on-rhel6.html' title='HowTo: Disable User List on RHEL6 / CentOS6 Login Window'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-114308800474959089</id><published>2012-03-29T13:46:00.000-05:00</published><updated>2012-03-29T13:46:58.911-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="hardlink"/><category scheme="http://www.blogger.com/atom/ns#" term="link"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="snapshot"/><category scheme="http://www.blogger.com/atom/ns#" term="softlink"/><title type='text'>Ghetto-timemachine Ruby Backup Script</title><content type='html'>I decided to try my hand at some Ruby scripting and figured, what better way than to port one of my existing Perl scripts.&lt;br /&gt;
&lt;br /&gt;
The result is the Ruby &lt;a href=&quot;https://github.com/flakrat/ghetto-timemachine/blob/master/ghetto-timemachine.rb&quot;&gt;ghetto-timemachine.rb&lt;/a&gt; backup script!&lt;br /&gt;
&lt;br /&gt;
The code is maintained here:&lt;br /&gt;
&lt;a href=&quot;https://github.com/flakrat/ghetto-timemachine&quot;&gt;https://github.com/flakrat/ghetto-timemachine&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So, what does it do? In a nutshell, it performs daily backups using a combination of hard links and rsync that result in a Time Machine like backup that uses very little additional space beyond the&amp;nbsp;initial&amp;nbsp;backup and the size of any files that change.&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Local source to local destination with comma separated list of excludes
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
./ghetto-timemachine.rb --src ~/Pictures --dest /media/USB/backup --excludes \*.raw,\*.bmp
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Local source to remote destination
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
./ghetto-timemachine.rb --src ~/Pictures --dest flakrat@rathole:/backup --excludes \*.raw,\*.bmp
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
Nightly cron job running at 1:10AM
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
10 1 * * * /home/flakrat/bin/ghetto-timemachine.rb --src ~/Pictures --dest flakrat@rathole:/backup --excludes \*.raw,\*.bmp
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
See the &lt;a href=&quot;https://github.com/flakrat/ghetto-timemachine/blob/master/README&quot;&gt;README&lt;/a&gt; for a more detailed description of the backup and rotation process.</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/114308800474959089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/114308800474959089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/114308800474959089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/114308800474959089'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/03/ghetto-timemachine-ruby-backup-script.html' title='Ghetto-timemachine Ruby Backup Script'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8938318954563611426</id><published>2012-03-15T09:59:00.000-05:00</published><updated>2012-03-15T09:59:47.483-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fedora 16"/><category scheme="http://www.blogger.com/atom/ns#" term="gnome 3"/><category scheme="http://www.blogger.com/atom/ns#" term="gnome terminal"/><category scheme="http://www.blogger.com/atom/ns#" term="nouveau"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><category scheme="http://www.blogger.com/atom/ns#" term="vi"/><title type='text'>Fedora 16 Gnome Terminal Redraw Doesn&#39;t Always Completely Render</title><content type='html'>I&#39;ve noticed an issue on my Fedora 16 workstation where Gnome Terminal redraws don&#39;t always completely render.&lt;br /&gt;
&lt;br /&gt;
For example, it could be as simple as pressing the up arrow key to scroll through the CLI history (or ESC K for the &#39;set -o vi&#39; crowd). A good percentage of the time when I&#39;d do that, the command line wouldn&#39;t completely render, CTRL C and scrolling again usually cleared it up.&lt;br /&gt;
&lt;br /&gt;
I also experienced the behavior a lot when in VI. Scroll or jump to a line and the text would end up being a combination of the previous page and the new location.&lt;br /&gt;
&lt;br /&gt;
I experienced the issue using Nouveau and binary Nvidia drivers.&lt;br /&gt;
&lt;br /&gt;
The following &lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=720605#c29&quot;&gt;Bugzilla ticket&lt;/a&gt; provided a possible workaround. I&#39;ve only just implemented the ENV variables, but after 1 day of use I have yet to experience the issue, where as before it was pretty consistent.&lt;br /&gt;
&lt;br /&gt;
To globally apply the settings, add the following variables to end of /etc/gdm/Xsession&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# Attempting to fix the Gnome terminal redraw issue:
# https://bugzilla.redhat.com/show_bug.cgi?id=720605
export CLUTTER_DEBUG=disable-culling
export CLUTTER_PAINT=disable-clipped-redraws:disable-culling

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
Reboot, log back in and hopefully the issue goes away :-)</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8938318954563611426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8938318954563611426' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8938318954563611426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8938318954563611426'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/03/fedora-16-gnome-terminal-redraw-doesnt.html' title='Fedora 16 Gnome Terminal Redraw Doesn&#39;t Always Completely Render'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8478035709575870471</id><published>2012-01-31T16:34:00.000-06:00</published><updated>2012-01-31T16:34:20.029-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="6.2"/><category scheme="http://www.blogger.com/atom/ns#" term="centos6"/><category scheme="http://www.blogger.com/atom/ns#" term="nouveau"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><category scheme="http://www.blogger.com/atom/ns#" term="quadro"/><title type='text'>CentOS 6.2 Installation issue with Dell Precision Workstation T7500</title><content type='html'>Attempting to kickstart a new Dell Precision Workstation T7500 with an nVidia Quadro 2000 with the CentOS6.2 DVD media resulted in a kernel panic. All signs pointed to the community built nouveau module &quot;nouveau_probe_i2c_addr panic&quot;&lt;br /&gt;
&lt;br /&gt;
I&#39;m not so worried about the nouveau module working, since the kickstart process installs the official nVidia binary release.&lt;br /&gt;
&lt;br /&gt;
To work around the issue and allow the system to boot fully into the installer, simply add &quot;rblacklist=nouveau&quot; to the argument list:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
&gt; vmlinuz initrd=initrd.img ks=http://srv1/ks/wks-el6.cfg rdblacklist=nouveau reboot=pci

&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8478035709575870471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8478035709575870471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8478035709575870471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8478035709575870471'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/01/centos-62-installation-issue-with-dell.html' title='CentOS 6.2 Installation issue with Dell Precision Workstation T7500'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-3843226877856349517</id><published>2012-01-18T17:02:00.003-06:00</published><updated>2012-01-30T16:37:26.847-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="check_mk"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="yum"/><title type='text'>How to Configure Nagios Check_MK to Report Number of Package Updates Need on Client</title><content type='html'>The Check_mk Updates plugin was posted to the &lt;a href=&quot;http://comments.gmane.org/gmane.network.nagios.checkmk/2911&quot;&gt;Check_mk mailing list by Jonathan Mills&lt;/a&gt;. The following Blog entry covers the steps I took to integrate it in my environment. I opted to distribute the two plugin files to the clients via puppet rather than RPM.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;OMD version: 0.51.20111117&lt;br /&gt;
&lt;li&gt;Puppet version: 2.6.12&lt;br /&gt;
&lt;li&gt;Server is CentOS 5.7 x86_64&lt;br /&gt;
&lt;li&gt;Clients are CentOS 5.7, CentOS 6.2, RHEL5.7, Fedora 16 ix86,x86_64&lt;br /&gt;
&lt;/ul&gt;Refrences &lt;ul&gt;&lt;li&gt;Jonathan Mills &lt;a href=&quot;http://comments.gmane.org/gmane.network.nagios.checkmk/2911&quot;&gt;check_mk mailing list post&lt;/a&gt; containing the source files&lt;br /&gt;
&lt;li&gt;Jonathan Mills &lt;a href=&quot;http://lists.mathias-kettner.de/pipermail/checkmk-en/2011-September/003682.html&quot;&gt;check_mk mailing list post&lt;/a&gt; feedback providing additional check_mk and nagios configurations&lt;br /&gt;
&lt;/ul&gt;This check currently only works with Yum based clients (tested on CentOS 5 and 6, RHEL5 and Fedora 16) and requires the yum-security package (EL5) or yum-plugin-securities (EL6)  The plugin attempts to identify security and non-security packages that are pending install. For RHEL, it&#39;s simple to get this info via &quot;yum --security check-update&quot;  &lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ sudo yum --security check-update
Loaded plugins: dellsysid, rhnplugin, security
Limiting package lists to security relevant ones
Needed 6 of 17 packages, for security

kernel.x86_64                        2.6.18-274.17.1.el5             rhel-x86_64-client-5
kernel-devel.x86_64                  2.6.18-274.17.1.el5             rhel-x86_64-client-5
kernel-headers.x86_64                2.6.18-274.17.1.el5             rhel-x86_64-client-5
libxml2.i386                         2.6.26-2.1.12.el5_7.2             rhel-x86_64-client-5
libxml2.x86_64                       2.6.26-2.1.12.el5_7.2             rhel-x86_64-client-5
libxml2-python.x86_64                2.6.26-2.1.12.el5_7.2             rhel-x86_64-client-5
&lt;/code&gt;&lt;/pre&gt;For CentOS and most likely Scientific Linux, the security errata are not provided with the repos, so the above command will always report 0 security updates.  This is solved in the plugin by parsing the results of the -v (verbose) output.  &lt;ol&gt;&lt;li&gt;Add the client side scripts to the puppet server (Puppet isn&#39;t necessary, you can install the RPM provided in the tar file on the check_mk post)&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create the file directories under site&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ mkdir -p var/lib/puppet/files/site/etc/check_mk
$ mkdir -p var/lib/puppet/files/site/usr/lib/check_mk_agent/plugins 
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Create the check_updates.cfg etc file&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ vim var/lib/puppet/files/site/etc/check_mk/check_updates.cfg 

&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# +------------------------------------------------------------------+
# |             ____ _               _        __  __ _  __           |
# |            / ___| |__   ___  ___| | __   |  \/  | |/ /           |
# |           | |   | &#39;_ \ / _ \/ __| |/ /   | |\/| | &#39; /            |
# |           | |___| | | |  __/ (__|   &amp;lt;    | |  | | . \            |
# |            \____|_| |_|\___|\___|_|\_\___|_|  |_|_|\_\           |
# |                                                                  |
# | Copyright Mathias Kettner 2010             mk@mathias-kettner.de |
# +------------------------------------------------------------------+
#
# This file is part of Check_MK.
# The official homepage is at http://mathias-kettner.de/check_mk.
#
# check_mk is free software;  you can redistribute it and/or modify it
# under the  terms of the  GNU General Public License  as published by
# the Free Software Foundation in version 2.  check_mk is  distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY;  with-
# out even the implied warranty of  MERCHANTABILITY  or  FITNESS FOR A
# PARTICULAR PURPOSE. See the  GNU General Public License for more de-
# ails.  You should have  received  a copy of the  GNU  General Public
# License along with GNU Make; see the file  COPYING.  If  not,  write
# to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
# Boston, MA 02110-1301 USA.

# check_updates.cfg
# This file configures mk_check_updates.

# interval (seconds) between runs of &#39;yum check-update&#39;
INTERVAL=7200

# path to log file
LOG=&quot;/var/log/check_updates.log&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Create the mk_check_updates script (The script has updates that I made to resolve some issues related to the priorities yum plugin and yum output beginning with Keeping or Removing, so it&#39;s slightly different than the original source)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ vim var/lib/puppet/files/site/usr/lib/check_mk_agent/plugins/mk_check_updates 

&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
#!/bin/bash
#
# OUTPUT:
# (security) (non-security) (runtime) (check age)
# &amp;lt;&amp;lt;&amp;lt;updates&amp;gt;&amp;gt;&amp;gt;
# 7 40 7 209

# Unix time (seconds since Unix epoch)
START=$(date +%s)

TIME=
AGE=

INTERVAL=86400                          # default interval once a day
LOG=&quot;/var/log/check_updates.log&quot;        # default path to log file

# Source config file if it exists
if [ -e &quot;/etc/check_mk/check_updates.cfg&quot; ]; then
    . /etc/check_mk/check_updates.cfg
fi

# function run_check_update
run_check_update () {
if which yum &gt;/dev/null; then

  if [ ! -e &quot;/var/run/yum.pid&quot; ]; then

    cat /dev/null &gt; $LOG

    # Check for security RPMS
    yum -v --security check-update | egrep &#39;(i.86|x86_64|noarch)&#39; | egrep -v &#39;\(priority\)&#39; |\
 egrep -v &#39;(^Keeping|^Removing|^Nothing|^Excluding|^Looking)&#39; | sed &#39;s/^.*--&gt; //g&#39; | while read L
    do

      RPM=$(echo $L | awk &#39;{print $1}&#39;)
      Q=$(echo ${L} | grep &#39;non-security&#39; &gt; /dev/null; echo $?)
      if [ $Q -eq 0 ]; then
        echo &quot;non-security $RPM&quot; &gt;&gt; $LOG
      else
        echo &quot;security $RPM&quot; &gt;&gt; $LOG
      fi

    done

  fi
fi
}

# function timeyet
timeyet () {
LAST=$(stat -c &#39;%Y&#39; $LOG)
NOW=$(date +%s)
AGE=$((NOW - LAST))
[ $AGE -gt $INTERVAL ] &amp;&amp; TIME=1 || TIME=0
}

# See if it&#39;s time to run &#39;yum check-updates&#39; yet
if [ ! -e $LOG ]; then
  touch $LOG
  run_check_update
  timeyet
else
  timeyet
  if [ $TIME = 1 ]; then
    run_check_update
    timeyet
  fi
fi

# Gather results from log file
SEC=$(grep &#39;^security&#39; $LOG | wc -l)
NON=$(grep &#39;^non-security&#39; $LOG | wc -l)

# Unix time (seconds since epoch)
END=$(date +%s)

RUNTIME=$((END - START))

echo &#39;&amp;lt;&amp;lt;&amp;lt;updates&amp;gt;&amp;gt;&amp;gt;&#39;
echo $SEC&quot; &quot;$NON&quot; &quot;$RUNTIME&quot; &quot;$AGE
exit 0

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Add the scripts to git&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ git add var/lib/puppet/files/site/usr/lib/check_mk_agent/plugins/mk_check_updates
$ git add var/lib/puppet/files/site/etc/check_mk/check_updates.cfg 
$ git commit -a -m &quot;Adding check_mk client side scripts to report yum updates&quot;
$ git push
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Add the scripts to the check_mk class to ensure that the clients get the code&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ vim etc/puppet/manifests/classes/check_mk.pp

&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# etc/puppet/manifests/classes/check_mk.pp

class check_mk {
   case $operatingsystem {
      &quot;centos&quot;,
      &quot;fedora&quot;,
      &quot;redhat&quot;: {
         package {[&quot;check_mk-agent&quot;, &quot;check_mk-agent-logwatch&quot;]:
            ensure   =&gt; latest,
            notify   =&gt; Service[&quot;xinetd&quot;],
         }
         service { &quot;xinetd&quot;:
            ensure     =&gt; running,
            enable     =&gt; true,
         }
         file { &quot;/etc/check_mk/check_updates.cfg&quot;:
            owner =&gt; &quot;root&quot;,
            group =&gt; &quot;root&quot;,
            mode =&gt; 755,
            source =&gt; &quot;puppet:///site/etc/check_mk/check_updates.cfg&quot;,
         }
         file { &quot;/usr/lib/check_mk_agent/plugins/mk_check_updates&quot;:
            owner =&gt; &quot;root&quot;,
            group =&gt; &quot;root&quot;,
            mode =&gt; 755,
            source =&gt; &quot;puppet:///site/usr/lib/check_mk_agent/plugins/mk_check_updates&quot;,
         }
     }
      default: { }
   }
}
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Ensure that the check_mk class is included in the node definitions (currently included in the baseclass template)&lt;br /&gt;
&lt;li&gt;Git commit the changes to check_mk.pp class and push to the git server&lt;br /&gt;
&lt;/ul&gt;&lt;li&gt;Install the python script on the nagios server (note user defined checks go in local/share/check_mk/checks, if you put them into $SITE/share.... they won&#39;t survive the next OMD upgrade)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ su - sitename
$ vim local/share/check_mk/checks/updates

&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-

# Jonathan Mills 10/2011

# Example output from agent:
# [security] [non-security] [runtime (seconds)] [age of results (seconds)]
# &amp;lt;&amp;lt;&amp;lt;updates&amp;gt;&amp;gt;&amp;gt;
# 7 40 0 13
#

updates_default_values = (5, 20)

# inventory
def inventory_updates(checktype, info):
    #if len(info) &gt;= 1 and len(info[0]) &gt;= 1:
    #    return [ (None, None) ]
    inventory = []
    inventory.append( (None, &quot;updates_default_values&quot;) )
    return inventory


# check
def check_updates(_no_item, params, info):
    # unpack check parameters
    min_num_sec, min_num_nonsec = params

    for line in info:
        perfdata = []
        sec = int(line[0])
        nonsec = int(line[1])
        age = int(line[3])
        infotext = &quot;%s Security Updates, %s Non-Critical Updates  (Last Checked %s seconds ago)&quot; % (sec, nonsec, age)
        perfdata.append( ( &quot;Runtime (sec)&quot;, int(line[2]) ) )
        if sec &gt; min_num_sec:
            return (2, &quot;CRITICAL - &quot; + infotext, perfdata)
        elif nonsec &gt; min_num_nonsec:
            return (1, &quot;WARNING - &quot; + infotext, perfdata)
        else:
            return (0, &quot;OK - &quot; + infotext, perfdata)

# declare the check to Check_MK
check_info[&#39;updates&#39;] = (check_updates, &quot;Updates&quot;, 1, inventory_updates)
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Add a new time period &#39;nightly&#39; to nagios that can be used to limit this check to running daily from 3AM to 4AM&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ vim etc/nagios/conf.d/timeperiods.cfg 
&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
###############################################################################
# TIMEPERIODS.CFG - SAMPLE TIMEPERIOD DEFINITIONS
#
# NOTES: This config file provides you with some example timeperiod definitions
#        that you can reference in host, service, contact, and dependency
#        definitions.
#
#        You don&#39;t need to keep timeperiods in a separate file from your other
#        object definitions.  This has been done just to make things easier to
#        understand.
#
###############################################################################

# This defines a timeperiod where all times are valid for checks,
# notifications, etc.  The classic &quot;24x7&quot; support nightmare. :-)
define timeperiod{
    timeperiod_name 24x7
    alias           24 Hours A Day, 7 Days A Week
    sunday          00:00-24:00
    monday          00:00-24:00
    tuesday         00:00-24:00
    wednesday       00:00-24:00
    thursday        00:00-24:00
    friday          00:00-24:00
    saturday        00:00-24:00
}

# &#39;workhours&#39; timeperiod definition
define timeperiod{
       timeperiod_name workhours
       alias           Normal Work Hours
       monday          08:00-17:00
       tuesday         08:00-17:00
       wednesday       08:00-17:00
       thursday        08:00-17:00
       friday          08:00-17:00
}

# &#39;none&#39; timeperiod definition
define timeperiod{
    timeperiod_name  none
    alias            No Time Is A Good Time
}

# &#39;nightly&#39; timeperiod definition
define timeperiod{
         timeperiod_name         nightly
         alias                   Nightly Check
         sunday                  03:00-04:00  ; Every Sunday of every week
         monday                  03:00-04:00  ; Every Monday of every week
         tuesday                 03:00-04:00  ; Every Tuesday of every week
         wednesday               03:00-04:00  ; Every Wednesday of every week
         thursday                03:00-04:00  ; Every Thursday of every week
         friday                  03:00-04:00  ; Every Friday of every week
         saturday                03:00-04:00  ; Every Saturday of every week
}

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Add the new check to check_mk main.mk file&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ vim etc/check_mk/main.mk

&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
# check-updates (OMD 0.52 requires user defined vars to prepend and underscore)
_updates_default_values = (6, 20) # check-updates: critical when 6 or more sec updates, warning when 20 or more non-sec updates

extra_service_conf[&quot;check_period&quot;] = [
  ( &quot;nightly&quot;, ALL_HOSTS, [ &quot;Updates&quot; ] ), # check-updates: Only check for updates from 3 to 4AM as set in timeperiods.cfg
]

extra_host_conf[&quot;max_check_attempts&quot;] = [
  ( &quot;1&quot;, ALL_HOSTS, [ &quot;Updates&quot; ] ), # check-updates: Only check for updates once
]

# Enable notifications for specific services
extra_service_conf[&quot;notifications_enabled&quot;] = [
  ( &quot;1&quot;, ALL_HOSTS, [&quot;Check_MK&quot;]),
  ( &quot;0&quot;, ALL_HOSTS, [&quot;Updates&quot;]), # check-updates: Don&#39;t notify for security OS updates
  ( &quot;1&quot;, ALL_HOSTS, [&quot;Memory used&quot;]),
  ( &quot;1&quot;, ALL_HOSTS, [&quot;IPMI Sensor Summary&quot;,&quot;fs_*&quot;]),
  ( &quot;1&quot;, [&quot;linsrv&quot;], [&quot;IPMI Sensor Summary&quot;,&quot;ambient_temp&quot;]),
  ( &quot;1&quot;, ALL_HOSTS, [&quot;Multipath *&quot;]),
  ( &quot;1&quot;, [&quot;kvm&quot;], ALL_HOSTS, [&quot;CPU load&quot;]),
  ( &quot;1&quot;, [&quot;kvm&quot;], ALL_HOSTS, [&quot;CPU utilization&quot;]),
  ( &quot;1&quot;, [&quot;mailsrv&quot;], [&quot;Postfix Queue&quot;]),
  ( &quot;1&quot;, [&quot;linsrv&quot;], ALL_HOSTS, [&quot;Dell OMSA&quot;]),
  ( &quot;0&quot;, ALL_HOSTS, ALL_SERVICES), # and disable notifications for everything else
]

service_groups = [
  ( &quot;updates&quot;, ALL_HOSTS, [ &quot;Updates&quot; ] ), # check-updates: Create updates service group to make viewing in web interface easier
]

define_servicegroups = {
   &quot;updates&quot; : &quot;RHEL/CentOS Yum Updates&quot;, # check-updates: Can now statically link to a service group web view: http://nagios.server/sitename/check_mk/view.py?view_name=servicegroup&amp;servicegroup=updates
}

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Rerun the inventory for the nodes&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ check_mk -II node-01
...

or for all nodes
$ check_mk -II
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Reload the services&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ check_mk -O

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Check the web page for the nodes, alternatively you can go straight to the Updates overview page:&lt;br /&gt;
&lt;a href=&quot;https://nagios.server/sitename/check_mk/view.py?view_name=servicegroup&amp;servicegroup=updates&quot;&gt;https://nagios.server/sitename/check_mk/view.py?view_name=servicegroup&amp;servicegroup=updates&lt;/a&gt;&lt;br /&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/3843226877856349517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/3843226877856349517' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3843226877856349517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3843226877856349517'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2012/01/how-to-configure-nagios-checkmk-to.html' title='How to Configure Nagios Check_MK to Report Number of Package Updates Need on Client'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8683230171285608874</id><published>2011-12-16T09:16:00.000-06:00</published><updated>2011-12-16T09:16:05.476-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="shutdown"/><category scheme="http://www.blogger.com/atom/ns#" term="slow"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware Workstation"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><title type='text'>VM Guests Take Forever to Shutdown in VMware Workstation 8</title><content type='html'>I recently had a situation where a user purchased a new i7 + SSD based laptop. Needless to say, the laptop is fast.&lt;br /&gt;
&lt;br /&gt;
As part of the purchase, the user also upgraded to the latest VMware Workstation, version 8.x. The users RHEL4 guest was transferred over from the old laptop (running an older version of Workstation). It powered up and ran just fine on the new hardware / version of VMware, with the exception of the guest shutdown.&lt;br /&gt;
&lt;br /&gt;
It literally took an hour from the point where the RHEL4 issued the halt to the underlying hardware (i.e. the OS portion of the shutdown is done) to a fully stopped virtual guest. From an appearance stand point, the VM screen turns black and remains that way until it fully stops.&lt;br /&gt;
&lt;br /&gt;
The laptop hard drive indicator was also flashing madly during the entire process.&lt;br /&gt;
&lt;br /&gt;
I found suggestions to prevent virus scanners from scanning .vmdk files, that didn&#39;t change the behaviour.&lt;br /&gt;
&lt;br /&gt;
The laptop also uses PGP whole disk encryption. Perhaps Workstation 8 and PGP don&#39;t play nicely together? I couldn&#39;t find any references. The old laptop (much slower than this) also had PGP with the older VMware Workstation, so PGP didn&#39;t seem to be a prime candidate.&lt;br /&gt;
&lt;br /&gt;
I eventually discovered &lt;a href=&quot;http://communities.vmware.com/thread/165207&quot;&gt;this post&lt;/a&gt; on the VMware message boards that provided the solution.&lt;br /&gt;
&lt;br /&gt;
The thread discusses a similar issue happening in VMware Workstation 6.0.4 on Windows XP.&lt;br /&gt;
&lt;br /&gt;
The solution was to add the following lines to either the global VMware config.ini file, or each individual guests .vmx file. &lt;b&gt;Exit out of VMware Workstation before modifying config.ini or the .vmx files&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
prefvmx.minVmMemPct = &quot;100&quot;
mainMem.useNamedFile = &quot;FALSE&quot;
mainMem.partialLazySave = &quot;FALSE&quot;
mainMem.partialLazyRestore = &quot;FALSE&quot;

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
With that code added to the configuration file, the virtual machine shuts down immediately after the operating system issues the halt.&lt;br /&gt;
&lt;br /&gt;
Placing the code in the config.ini file affects all virtual machines, new and existing, unless the settings are overridden in the individual .vmx files.&lt;br /&gt;
&lt;br /&gt;
For Windows 7, the config.ini file can be found here&lt;br /&gt;
&lt;b&gt;C:\ProgramData\VMware\VMware Workstation\config.ini&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For Windows XP it can be found here:&lt;br /&gt;
&lt;b&gt;C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8683230171285608874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8683230171285608874' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8683230171285608874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8683230171285608874'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2011/12/vm-guests-take-forever-to-shutdown-in.html' title='VM Guests Take Forever to Shutdown in VMware Workstation 8'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-7852470630958509601</id><published>2011-11-18T18:25:00.000-06:00</published><updated>2011-11-18T18:25:24.932-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="centos"/><category scheme="http://www.blogger.com/atom/ns#" term="centos6"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="kickstart"/><category scheme="http://www.blogger.com/atom/ns#" term="vmlinuz"/><title type='text'>Dell Optiplex 790 Workstations hang while rebooting with CentOS 6</title><content type='html'>I&#39;m working on deploying a large number of Dell Optiplex 790 workstations using kickstart and CentOS 6.&lt;br /&gt;
&lt;br /&gt;
During the initial testing I found that the 790&#39;s wouldn&#39;t completely reboot with CentOS 6 installed or booted into the install media. They&#39;d get as far as &quot;Restarting&quot;.&lt;br /&gt;
&lt;br /&gt;
The solution is to pass an option to the kernel:&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
reboot=pci

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
This can be added manually to the grub configuration file for systems already installed. For kickstarting:&lt;br /&gt;
&lt;br /&gt;
1. Add the option in your kickstart file&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
bootloader --location=mbr --driveorder=sda --append=&quot;crashkernel=auto rhgb quiet reboot=pci&quot; --md5pass=$1$.xxxxx

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
2. During the initial boot off of the CD/DVD, press TAB to alter to boot options (this is all one continuous line broken into multiple for readability)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
&gt; vmlinuz initrd=initrd.img ks=http://192.168.1.5/ks/el6/wks1.cfg
    ip=192.168.1.100 netmask=255.255.255.0 gateway=192.168.1.1 nameserver=192.168.1.1
    ksdevice=eth0 reboot=pci

&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/7852470630958509601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/7852470630958509601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/7852470630958509601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/7852470630958509601'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2011/11/dell-optiplex-790-workstations-hang.html' title='Dell Optiplex 790 Workstations hang while rebooting with CentOS 6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-3316393140638866564</id><published>2011-11-10T11:34:00.000-06:00</published><updated>2011-11-10T11:34:57.510-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="boot"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora 16"/><category scheme="http://www.blogger.com/atom/ns#" term="grub"/><category scheme="http://www.blogger.com/atom/ns#" term="grub2"/><category scheme="http://www.blogger.com/atom/ns#" term="mdadm"/><category scheme="http://www.blogger.com/atom/ns#" term="raid"/><title type='text'>Fedora 16 does not Boot if /boot is on Software RAID</title><content type='html'>In previous versions of Fedora, you could configure /boot to exist on a software RAID device (say a software mirror), however in Fedora 16 this will result in failure to boot. This wasn&#39;t a supported configuration, but it used to work.&lt;br /&gt;
&lt;br /&gt;
This is a known &quot;&lt;a href=&quot;http://fedoraproject.org/wiki/Common_F16_bugs#Cannot_boot_with_.2Fboot_partition_on_a_software_RAID_array&quot;&gt;issue&lt;/a&gt;&quot; and is explained as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Cannot boot with /boot partition on a software RAID array&lt;br /&gt;
link to this item - Bugzilla: #750794&lt;br /&gt;
&lt;br /&gt;
Attempting to boot after installing Fedora 16 with the /boot partition on a software RAID array will fail, as the software RAID modules for the grub2 bootloader are not installed. Having the /boot partition on a RAID array has never been a recommended configuration for Fedora, but up until Fedora 16 it has usually worked.&lt;br /&gt;
&lt;br /&gt;
To work around this issue, do not put the /boot partition on the RAID array. Create a simple BIOS boot partition and a /boot partition on one of the disks, and place the other system partitions on the RAID array. Alternatively, you can install the appropriate grub2 modules manually from anaconda&#39;s console before rebooting from the installer, or from rescue mode. Edit the file /mnt/sysimage/boot/grub2/grub.cfg and add the lines:&lt;br /&gt;
&lt;br /&gt;
insmod raid&lt;br /&gt;
insmod mdraid09&lt;br /&gt;
insmod mdraid1x&lt;br /&gt;
Now run these commands:&lt;br /&gt;
&lt;br /&gt;
chroot /mnt/sysimage&lt;br /&gt;
grub2-install /dev/sda&lt;br /&gt;
grub2-install /dev/sdb&lt;br /&gt;
Adjust the device names as appropriate to the disks used in your system.&lt;/blockquote&gt;&lt;br /&gt;
I had a system where I&#39;d created a mirror for /boot that had been reinstalled from Fedora 13, 14, 15 and now 16. As reported, it failed to boot following the F16 install.&lt;br /&gt;
&lt;br /&gt;
Destroying the mirror and creating a simple /dev/sda2 partition for /boot got it booting.</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/3316393140638866564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/3316393140638866564' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3316393140638866564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/3316393140638866564'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2011/11/fedora-16-does-not-boot-if-boot-is-on.html' title='Fedora 16 does not Boot if /boot is on Software RAID'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-6736559654486423203</id><published>2011-11-04T12:25:00.002-05:00</published><updated>2011-12-21T14:52:41.859-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="check_dell_bladechassis"/><category scheme="http://www.blogger.com/atom/ns#" term="check_mk"/><category scheme="http://www.blogger.com/atom/ns#" term="check_openmanage"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="omd"/><title type='text'>Using check_dell_bladechassis with check_mk</title><content type='html'>This post builds off of a &lt;a href=&quot;http://flakrat.blogspot.com/2011/03/using-checkopenmanage-with-checkmk.html&quot;&gt;previous post&lt;/a&gt; that documented getting &lt;a href=&quot;http://folk.uio.no/trondham/software/check_openmanage.html&quot;&gt;check_openmanage&lt;/a&gt; working with check_mk.&lt;br /&gt;
&lt;br /&gt;
In this post we&#39;ll add &lt;a href=&quot;http://folk.uio.no/trondham/software/check_dell_bladechassis.html&quot;&gt;check_dell_bladechassis&lt;/a&gt; to the mix to allow for monitoring of Dell M1000e blade chassis&#39; (via the CMC management card).&lt;br /&gt;
&lt;br /&gt;
This was done on the following system:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;CentOS 5.7 x86_64 KVM virtual machine&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://omdistro.org/&quot;&gt;OMD 0.50&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://folk.uio.no/trondham/software/check_openmanage.html&quot;&gt;check_openmanage 3.7.3&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href=&quot;http://folk.uio.no/trondham/software/check_dell_bladechassis.html&quot;&gt;check_dell_bladechassis 1.0.0&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;Dell M1000e chassis are queried via SNMP&lt;br /&gt;
&lt;/ul&gt;Unless otherwise specified all paths are relative to the site owners home (ex: /opt/omd/sites/mysite)  The check_openmanage code in this blog post is not necessary to get check_dell_bladechassis, I&#39;m just including it to help tie this entry to the &lt;a href=&quot;http://flakrat.blogspot.com/2011/03/using-checkopenmanage-with-checkmk.html&quot;&gt;previous post&lt;/a&gt;. &lt;ol&gt;&lt;li&gt;Change users on your OMD server to the site user: $ su - mysite&lt;br /&gt;
&lt;li&gt;Download the latest check_dell_bladechassis from &lt;a href=&quot;http://folk.uio.no/trondham/software/check_dell_bladechassis.html&quot;&gt;http://folk.uio.no/trondham/software/check_dell_bladechassis.html&lt;/a&gt; to ~/tmp and extract&lt;br /&gt;
&lt;li&gt;copy the check_dell_bladechassis script to local/lib/nagios/plugins (this defaults to $USER2$ in your commands)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ cp tmp/check_dell_bladechassis-1.0.0/check_dell_bladechassis local/lib/nagios/plugins/
$ chmod +x local/lib/nagios/plugins/check_dell_bladechassis
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;copy the PNP4Nagios template&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ cp tmp/check_dell_bladechassis-1.0.0/check_dell_bladechassis.php etc/pnp4nagios/templates/
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Test check_dell_bladechassis to see that it can successfully query an M1000e CMC (I&#39;ve inserted carriage returns in the output to make it more readable)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
local/lib/nagios/plugins/check_dell_bladechassis -H dell-m1000e-01 -p -C MySecretCommunity

OK - System: &#39;PowerEdge M1000e&#39;, SN: &#39;XXXXXX&#39;, Firmware: &#39;3.03&#39;, hardware working fine|
&#39;total_watt&#39;=1500.000W;0;7928.000 &#39;total_amp&#39;=6.750A;0;0 &#39;volt_ps1&#39;=239.500V;0;0 
&#39;volt_ps2&#39;=242.750V;0;0 &#39;volt_ps3&#39;=242.750V;0;0 &#39;volt_ps4&#39;=241.750V;0;0 &#39;volt_ps5&#39;=241.750V;0;0 
&#39;volt_ps6&#39;=242.750V;0;0 &#39;amp_ps1&#39;=1.688A;0;0 &#39;amp_ps2&#39;=1.641A;0;0 &#39;amp_ps3&#39;=0.188A;0;0 
&#39;amp_ps4&#39;=1.516A;0;0 &#39;amp_ps5&#39;=1.500A;0;0 &#39;amp_ps6&#39;=0.219A;0;0

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Edit the main.mk file to define the command, etc... (the perfdata_format and monitoring_host I got from a previous emailer to the list, not sure if they are needed)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
all_hosts = [
 &#39;dell-m1000e-01|snmp|m1000e|nonpub&#39;,
 &#39;dell-r710-01|linsrv|kvm|omsa|nonpub&#39;,
 &#39;dell-2950-01|linsrv|omsa|nonpub&#39;,
 &#39;hp-srv-01|winsrv|smb&#39;, ]

# Are you using PNP4Nagios and MRPE checks? This will make PNP
# choose the correct template for standard Nagios checks:
perfdata_format = &quot;pnp&quot;
#set the monitoring host
monitoring_host = &quot;nagios&quot;

# SNMP Community
snmp_default_community = &quot;someCommunityRO&quot;

snmp_communities = [
  ( &quot;MySecretCommunity&quot;, [&quot;nonpub&quot;], ALL_HOSTS ),
]

extra_nagios_conf += r&quot;&quot;&quot;

# ARG1: community string
define command {
    command_name    check_openmanage
    command_line    $USER2$/check_openmanage -H $HOSTADDRESS$ -p -C $ARG1$
}

define command {
    command_name    check_dell_bladechassis
    command_line    $USER2$/check_dell_bladechassis -H $HOSTADDRESS$ -p -C $ARG1$
}

&quot;&quot;&quot;

legacy_checks = [
  # On all hosts with the tag &#39;omsa&#39; check Dell OpenManage for status 
  # service description &quot;Dell OMSA&quot;, process performance data
  ( ( &quot;check_openmanage!MySecretCommunity&quot;, &quot;Dell OMSA&quot;, True), [ &quot;omsa&quot; ], ALL_HOSTS ),
  # similar for m1000e
  ( ( &quot;check_dell_bladechassis!MySecretCommunity&quot;, &quot;Dell Blade Chassis&quot;, True), [ &quot;m1000e&quot; ], ALL_HOSTS ),

]

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;That should be it, reinventory your M1000e and reload&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
$ check_mk -II dell-m1000e-01
$ check_mk -O

&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;The php code has a bug that can be fixed using the below patch (see the first comment for details)&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
--- a/check_dell_bladechassis.php 2009-08-04 07:00:15.000000000 -0500
+++ b/check_dell_bladechassis.php 2011-12-21 14:44:25.488132187 -0600
@@ -41,7 +41,7 @@
  
  $opt[$count] = &quot;--slope-mode --vertical-label \&quot;$vlabel\&quot; --title \&quot;$def_title: $title\&quot; &quot;;
  
-        $def[$count] .= &quot;DEF:var$i=$rrdfile:$DS[$i]:AVERAGE &quot; ;
+        $def[$count] = &quot;DEF:var$i=$rrdfile:$DS[$i]:AVERAGE &quot; ;
         $def[$count] .= &quot;AREA:var$i#$PWRcolor:\&quot;$NAME[$i]\&quot; &quot; ;
         $def[$count] .= &quot;LINE:var$i#000000: &quot; ;
 
@@ -62,7 +62,7 @@
  
  $opt[$count] = &quot;-X0 --lower-limit 0 --slope-mode --vertical-label \&quot;$vlabel\&quot; --title \&quot;$def_title: $title\&quot; &quot;;
  
-        $def[$count] .= &quot;DEF:var$i=$rrdfile:$DS[$i]:AVERAGE &quot; ;
+        $def[$count] = &quot;DEF:var$i=$rrdfile:$DS[$i]:AVERAGE &quot; ;
         $def[$count] .= &quot;AREA:var$i#$AMPcolor:\&quot;$NAME[$i]\&quot; &quot; ;
         $def[$count] .= &quot;LINE:var$i#000000: &quot; ;
 
@@ -75,6 +75,7 @@
     if(preg_match(&#39;/^volt_/&#39;,$NAME[$i])){
  if ($visited_volt == 0) {
      ++$count;
+     $def[$count] = &#39;&#39;;
      $visited_volt = 1;
  }
  
@@ -87,6 +88,7 @@
  
  $def[$count] .= &quot;DEF:var$i=$rrdfile:$DS[$i]:AVERAGE &quot; ;
  $def[$count] .= &quot;LINE:var$i#&quot;.$colors[$v++].&quot;:\&quot;$NAME[$i]\&quot; &quot; ;
+
  $def[$count] .= &quot;GPRINT:var$i:LAST:\&quot;%3.2lf $UNIT[$i] last \&quot; &quot;;
  $def[$count] .= &quot;GPRINT:var$i:MAX:\&quot;%3.2lf $UNIT[$i] max \&quot; &quot;;
  $def[$count] .= &quot;GPRINT:var$i:AVERAGE:\&quot;%3.2lf $UNIT[$i] avg \\n\&quot; &quot;;
@@ -96,6 +98,7 @@
     if(preg_match(&#39;/^amp_/&#39;,$NAME[$i])){
  if ($visited_amp == 0) {
      ++$count;
+     $def[$count] = &#39;&#39;;
      $visited_amp = 1;
  }
 
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;br /&gt;
Hope this helps, and comments are welcome.</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/6736559654486423203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/6736559654486423203' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6736559654486423203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/6736559654486423203'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2011/11/using-checkdellbladechassis-with.html' title='Using check_dell_bladechassis with check_mk'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5521735836171938846.post-8220705981244915949</id><published>2011-06-23T12:22:00.001-05:00</published><updated>2011-09-28T11:00:38.380-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="check_mk"/><category scheme="http://www.blogger.com/atom/ns#" term="extra_service_conf"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="omd"/><title type='text'>HowTo - Selectively enable service notifications in Check_mk / OMD</title><content type='html'>&lt;a href=&quot;http://mathias-kettner.de/check_mk.html&quot;&gt;Check_mk&lt;/a&gt; installed via &lt;a href=&quot;http://omdistro.org/&quot;&gt;Open Monitoring Distribution&lt;/a&gt; are an extremely powerful combination for monitoring devices on a network.&lt;br /&gt;
&lt;br /&gt;
Notifications from &lt;a href=&quot;http://www.nagios.org/&quot;&gt;Nagios&lt;/a&gt; for the services discovered by Check_mk can overwhelm your inbox / mobile phone if notification for all services is enabled (default).&lt;br /&gt;
&lt;br /&gt;
The following configures Nagios via Check_mk in an &#39;opt-in&#39; method for service notifications using extra_service_conf in main.mk&lt;br /&gt;
&lt;br /&gt;
The following section in main.mk will:&lt;br /&gt;
* Enable notifications for &quot;IPMI Sensor Summary&quot; to get temperature alerts&lt;br /&gt;
* Enable notifications for &quot;fs_*&quot; to get alerts for all file system disk usage&lt;br /&gt;
* Enable notifications for &quot;Memory Used&quot; for a specific server, server1&lt;br /&gt;
* Disabling all other service notifications&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;source-code&quot;&gt;&lt;code&gt;
extra_service_conf[&quot;notifications_enabled&quot;] = [
  ( &quot;1&quot;, ALL_HOSTS, [&quot;IPMI Sensor Summary&quot;,&quot;ambient_temp&quot;]),
  ( &quot;1&quot;, ALL_HOSTS, [&quot;IPMI Sensor Summary&quot;,&quot;fs_*&quot;]),
  ( &quot;1&quot;, [&quot;server1&quot;], [&quot;Memory Used&quot;]),
  ( &quot;0&quot;, ALL_HOSTS, ALL_SERVICES),
]
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://flakrat.blogspot.com/feeds/8220705981244915949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5521735836171938846/8220705981244915949' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8220705981244915949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5521735836171938846/posts/default/8220705981244915949'/><link rel='alternate' type='text/html' href='http://flakrat.blogspot.com/2011/06/howto-selectively-enable-service.html' title='HowTo - Selectively enable service notifications in Check_mk / OMD'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08465734610397231615</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>