Archive for the ‘Linux’ Category

Clear ARP on various systems

Just a quick reference for how to clear ARP entries on various systems following a network change: Windows Print arp table: arp -a Delete single entry: arp -d 192.168.1.1 Delete entire arp table: arp -d * Add static entry: arp -s 192.168.1.1 00-aa-00-62-c6-09 Cisco ASA/IOS/NX-OS Print arp table: show arp Delete entire arp table: clear […]

Distributed Monitoring in Nagios with check_mk multisite

For some time now, I’ve been exploring the best ways of configuring a distributed Nagios setup. With the “federated” configuration that Nagios recommend, you can pass data from remote Nagios instances back to a central Nagios server with the use of passive checks combined with NSCA or NRDP. Whilst this works well, the duplicate configuration […]

check_cab Nagios plugin for Hawk-I rack monitoring

If you use Sinetica Hawk-I or RacKMS to manage/monitor your datacentre cabinets, I’ve created a Nagios plugins to monitor each of the sensors (temperature/humidity etc). You can grab check_cab over at Nagios Exchange.

Moving from SysV to Systemd

Goodbye initd, systemd is here!  Systemd brings a lot of benefits such as parallel startups and enhanced troubleshooting but sure does takes some getting used to when you have been working in a completely different way for your entire Linux life!  Systemd is now shipping with CentOS7 and most of the other major distros, so […]

Export Java Keystore Certificate & Private Key to PEM

I always find Java Keystores a total ballache to work with, would rather manage individual PEM files any day of the week. If you need to export the contents for use with something else you can use the following commands: Export from JKS to PKCS #12. keytool -importkeystore -srckeystore oldkeystore.jks -destkeystore cert.p12 -deststoretype PKCS12 -srcalias […]

Gluster active/passive cluster

Gluster is a nice distributed file system which offers some management benefits over block level storage systems like DRBD. By design Gluster works in an active/active cluster configuration, however for applications where millisecond precision data replication is essential, an active/passive configuration is preferable. This is how (based on SLES11 with HAE): usual SLES HA cluster […]

Destroy gluster brick

If you wish to destroy or recreate a Gluster brick, it leaves some traces behind on the filesystem. This is the procedure to blat it: umount gluster volume stop gv0 gluster volume delete gv0 attr -lq /data/gv0/brick1 setfattr -x trusted.glusterfs.volume-id /data/gv0/brick1/ setfattr -x trusted.gfid /data/gv0/brick1/ rm –rf /data/gv0/brick1/.glusterfs /etc/init.d/glusterd restart

Linux open files limit

System-wide file descriptors limits: View: cat /proc/sys/fs/file-max Set: sysctl -w fs.file-max=100000 Set persistently: vi /etc/sysctl.conf fs.file-max = 100000 then run sysctl -p User level file descriptors limits: View: su – httpd $ ulimit -Hn $ ulimit -Sn Set: vi /etc/security/limits.conf httpd soft nofile 4096 httpd hard nofile 10240

Load Balanced Linux Web Cluster

Another example of a load balanced apache cluster, this time active-active using Pacemaker/Corosync/ldirectord. This example is using CentOS. 10.11.1.40 – fixed IP of server1 10.11.1.41 – fixed IP of server 2 10.11.1.80 – apache site 1 (virtual IP) 10.11.1.50 – apache site 1 server 1 10.11.1.51 – apache site 1 server 2 10.11.1.90 – apache […]

Some Munin Notes

Munin – its pretty handy for monitoring stuff over time to view trends. Some notes to get it up and running with a minimal config: Install munin on monitoring server: apt-get install munin vi /etc/munin/munin.conf Add something like: [Webservers;webserver-01] address 2.11.1.40 use_node_name yes [Webservers;webserver-01] address 2.11.1.40 use_node_name yes Group by something sensible, i.e server type, […]