Tuesday, 12 November 2013

Handy TSM queries

#query act log for media errors
q act begind=-1 search="media error"

#note the vol with error and query it to get its status
q libv cir-g-lib f=d

#check the volume out
checkout libv checkl=no rem=bulk

#query configured schedules
query sched f=d

#Removing a node from backup
q node f=d
q filespace
del filespace  *           (this removes all backup data for node1)
del filespace   nametype=fsid            (fsid is an integer for filesystem id)
remove node

#Renaming a node
rename node node2 node3 (this renames the node, but it keeps all the data)
(you'll need to logon to node2/3 and edit the dsm.opt/dsm.sys file etc and restart the scheduler to rename it on that side too).

#List filespaces that have not been backed up in the last 10 days for node
SELECT node_name,filespace_name, filespace_type,DATE(backup_end) as DATE FROM filespaces WHERE -node_name='' and DAYS(current_date)-DAYS(backup_end)>10

#show backups for the last 7 days
q event * * begind=-7 begint=12:00 endd=today node=

#show last backup completion date/time
q file  f=d

#show last successful backup end times for node
select END_TIME from summary where activity='BACKUP' and SUCCESSFUL='YES' and ENTITY=''

Wednesday, 7 August 2013

Simple straightforward upgrading of firmware on Dell servers

This has been testsed on Dell PowerEdge R720 running 64bit Centos 6.4

###Upgrade BIOS and firmware
###need to install 32bit libraries as the upgrade program itself is 32bit
yum install glibc.i686 libstdc++.i686 zlib.i686 libxml2.i686 compat-libstdc++.i686

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum install dell_ft_install
yum install $(bootstrap_firmware)
inventory_firmware
update_firmware
update_firmware –-yes

Friday, 14 September 2012

Meaning of /etc, /usr in Linux?

In my career, I have come across many people who have described the acronyms /etc, and /usr in very different ways. However, for all other purposes, all the users and Linux community generally agree on the use intended or otherwise, of these filesystem hierarchy levels.
The discussions that i have heard goes like so:

/usr


/usr: "user". , eg. /usr/bin is for general user binaries, /usr/doc and /usr/share/doc

Actually, /usr stands for Unix System Resources.

/usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc.... X and its supporting libraries can be found here. User programs like telnet, ftp, etc.... are also placed here. In the original Unix implementations, /usr was where the home directories of the users were placed (that is to say, /usr/someone was then the directory now known as /home/someone). In current Unices, /usr is where user-land programs and data (as opposed to 'system land' programs and data) are. The name hasn't changed, but it's meaning has narrowed and lengthened from "everything user related" to "user usable programs and data". As such, some people may now refer to this directory as meaning 'User System Resources' and not 'user' as was originally intended.

usr stands for "user-specific resources" and it fits quite nicly i think. it might be other abbreviations that is used with "usr" though, but i wouldnt know about them other then the ones ive read in this thread

According to linux-training.be/files/books/html/fun/ch09s08.html, it stands for Unix System Resources.

/usr - The secondary hierarchy which contain its own bin and sbin sub-directories.


/etc

 '/etc' is indeed an acronym and stands for "Editable Text Configuration".

Yes, etc stands for "etcetera" It's purpose in life is to host various configuration files from around your system.

Probably not the official meaning, but I have seen etc referred to as "editable text configuration".

it means the simple 'etcetera'

it means 'extended tool chest' per this gnome mailing list entry or per this Norwegian article.

"editable text configurations" is a stupid name too, because if it's text, it's evidently editable. So why not just "text configurations" then? Also, in early Unix, everything was editable (remember, in Unix, everything is a file), so that's superfluous too. And, lastly, it was the repository for a lot of things that weren't configurations, including binaries.

So whats your take on these!

Monday, 10 September 2012

Fixed RHEL/Centos 5 rpms for net-snmp-5.3.2.2-17 gpfs support

As raised in bug note 707912 ( https://bugzilla.redhat.com/show_bug.cgi?id=707912)
where net-snmp does not see mounted xfs filesystems, the shipped net-snmp-5.3.2.2-17 in the Centos 5.8 tree does (and probably later versions in RHEL6 as well) does not support gpfs filesystems either.
The implication is that those who are upgrading from earlier versions (e.g. from Centos 5.5 to 5.8) will lose snmp monitoring of gpfs filesystems.
All the versions in the Centos 5.8 tree are broken. The only way to address the issue if to upgrade to a later tree (e.g. to Centos 6.3) or to build from source or to use third-party rpms.
I have managed to patch and rebuild the shipped net-snmp-5.3.2.2-17.x86_64.rpm and that has proved to be an easier, low risk alternative.
Those who may need to reuse my binaries are herehere & here
~]# yum remove net-snmp net-snmp-libs
~]# rpm -Uvh net-snmp-libs-5.3.2.2-17.x86_64.rpm
~]# rpm -Uvh net-snmp-5.3.2.2-17.x86_64.rpm
~]# rmp -Uvh net-snmp-utils-5.3.2.2-17.x86_64.rpm
~]# yum install OpenIPMI (re-install if you had removed it as dependent in first command)

Monday, 23 July 2012

Zenoss Filesystems Monitoring

Have came across many zenoss users asking about changing the default thresholds for filesystem, disk utilisation. In many cases, the issue is about the fact that the default template calculates percentage utilisation and and a threshold like (95%) may not be appropriate for large (hundreds of terabytes) filesystems.

There are a couple of things that can be done.
1. Modify the default template
2. Use a transform in /Events/Perf/Filesystem that calculate actual figures, then decide the fate of events based on these figures (you can obtain such a transform here)

If the first approach above sounds good, I may be able to upload a zenpack which adds a second graph on the template, and also contains a modified copy of FileSystem.py

Thursday, 5 July 2012

GPFS Highly Available (HA) SNMP monitoring configuration

The available/documented GPFS SNMP implementation (By IBM) is not designed to be highly available.
There is only one SNMP collector node at a time. If that node fails the SNMP monitoring does not fail over to any other node and thus complete loss of cluster monitoring/reporting.

This blog post offers a simple implementation of gpfs snmp monitoring failover. The failover scheme uses a callback mechanism triggered by a quorumNodeLeave event and the eventNode is its only parameter.

First create a folder to contain your callbacks (if you already have a location for your callbacks, use that instead)
Download/copy the following script into the callbacks location and make it executable.


Modify the script to indicate your available collector nodes by substituting "quorum" and "quorum_node_2" with the hostnames of your gpfs quorum nodes.

Note that in this case the callbacks location is /callback so you may have to modify the script accordingly.

Copy the modified script to all quorum nodes

Add the callback (run once from any quorum node);
mmaddcallback NodeDownCallback --command  /callback/snmp_collector_failover.sh --event quorumNodeLeave --parms %eventNode

if you want monitoring to be reverted back to the default prefered collector node after it comes back online, you may consider adding a node join callback;
mmaddcallback NodeJoinCallback --command  /callback/snmp_collector_failover.sh --event quorumNodeJoin --parms %eventNode

Unix --> Linux --> Android

What is Unix?
[From Wikipedia] Unix (officially trademarked as UNIX, sometimes also written as Unix) is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, Michael Lesk and Joe Ossanna. The Unix operating system was first developed in assembly language, but by 1973 had been almost entirely recoded in C, greatly facilitating its further development and porting to other hardware. Today's Unix system evolution is split into various branches, developed over time by AT&T as well as various commercial vendors, universities (such as University of California, Berkeley's BSD), andnon-profit organizations.
The Open Group, an industry standards consortium, owns the UNIX trademark. Only systems fully compliant with and certified according to the Single UNIX Specification are qualified to use the trademark; others might be called Unix system-like or Unix-like, although the Open Group disapproves[1] of this term. However, the term Unix is often used informally to denote any operating system that closely resembles the trademarked system.
During the late 1970s and early 1980s, the influence of Unix in academic circles led to large-scale adoption of Unix (particularly of the BSD variant, originating from the University of California, Berkeley) by commercial startups, the most notable of which are SolarisHP-UX and AIX, as well as Darwin, which forms the core set of components upon whichApple's OS XApple TV, and iOS are based.[2][3] Today, in addition to certified Unix systems such as those already mentioned, Unix-like operating systems such as MINIXLinuxAndroid, and BSD descendants (FreeBSDNetBSD,OpenBSD, and DragonFly BSD) are commonly encountered. The term traditional Unix may be used to describe an operating system that has the characteristics of either Version 7 Unix or UNIX System V
What are other unix-like operating systems?
Linux (including all its flavours eg, Redhat, Suse, Ubuntu, Centos, Debial etc)
Android
BSD (OpenBSD, FreeBSD etc)


Apple Mac OS (including iOS)
Apple's operating systems are derived from Unix, therefore they share a lot of features with Linux and other Unix/Unix-like operating systems.


Where is Linux used
Linux is, and has been the main driver of Internet (servers) for decades. It is the most used operating system in Servers (behind the scenes stuff) with Windows being the most popular for Client systems (Personal computers and desktops)
There are some upcoming popular Linux Desktops eg. Ubuntu


Linux, just as its parent Unix, has given birth to its own set of various derivatives like Android
Because Linux is highly customization, a lot of hardware manufacturers have used it as the operating system in their electronic products. Because these products are specialised (one task) computers, this operating system within them is generally know as the firmware


Firmware for many networking (internet) capable hardware devices use Linux
eg. Routers, TVs, Portable Media Players, Soft Phones all use some form of Linux at the core of its operations.
Some sensor devices like the Zigbee sensors also use some form of Linux as their central system
A majority of mobile phones (both feature and smartphones) use a derivative of Unix/Linux as their operating systems


Why Linux is so popular, whilst little known
Linux is like underwear in our life. Its necessary and everyone subtly uses one, without thinking about it, but there are great companies producing these undergarments around the clock. You have freedom to wear the one you like, that suits your needs, or even to modify at will. You have choice to have the very cheap (or free) yet functional ones, or flashy brands according to your taste. Most people who use Linux say the major thing about is "Freedom" Whatever that means, Linux is a basic component of our modern technologies.