Tuesday, August 8, 2017

# nickel hpux # nickel problem and solution

UNIX: Problems and Solutions to Running Nickel on HP-UX

Back then whenever a server crashed, one of the first things I used to do was to run nickel script to collect all kind of system logs so us engineers can start investigation. Nickel stands for Network related Information Collector, Keeper and Elaborator.

It is free, sometimes located in the HP-UX machine itself, or maybe in your sharepoint. Download and save it into the server and run the sh script

But what I am going to show here is the problems that usually arise with nickel (imagine running a stress test for a heart patient) and the solution

Tested on older versions of HP-UX

I trust you have the necessary tools and permissions to run nickel

Transferring nickel file from Windows to UNIX via ftp

1. Unzip latest nickel.zip in PC (Windows)

2. If /opt/contrib/bin does not exist on client server then create a directory path 

     # mkdir -p /opt/contrib/bin

3. FTP nickel from Windows PC to HP-UX server in "BINARY" mode, into /opt/contrib/bin

4. In the HP-UX server, go into the said directory

     # cd /opt/contrib/bin 

5. Change permission of the file

     # chmod 555 nickel 

6. Run nickel script

     # ./nickel 

7. A file: nickel.yourhostname.tar.gz will be created.

8. FTP in "BINARY" mode, nickel.yourhostname.tar.gz to Windows PC

The reason I am stressing about FTPing in Binary mode is because by default most FTP software uses ASCII mode and this is generally corrupt the tarball file, hence the Binary mode to transfer

What to do if nickel script appears to hung while running (i.e running for 30 mins is one of it)

Well, if nickel is not giving any output, then it may have hung while running. I have had this many times, not a reason to worry or panic. Here's what I used to do

Solution 1

1. Exit nickel session with Ctrl + C

2. Issue following commands

     # /sbin/init.d/diagnostic stop
     # /sbin/init.d/diagnostic start

3. Run Nickel again

     # cd /opt/contrib/bin
     # ./nickel

Solution 2

This is a solution to yet another problem that may arise after attempting Solution 1 where nickel again hangs ar *stm*

1. Telnet another session to the said server

2. Run the following commands

     # ps -ef | grep nickel
     # kill -9
     # kill -9

   Repeat above step if necessary

Solution 3

Because nickel is not perfect or God sent...

Possible causes for error "There is not enough memory available now" while running nickel

1. Server was too busy at that time

2. While the script does # cat  of big *.log files or when it is collecting network log netfmt

3. You may may have noticed some logs collected in nickel appear blank (in this case the process is not completed, hence the blank logs)

4. OLD STM , the query for STM info is slow, believe me

Solution to memory shortage error:

1. Backup & nullify the logs (if it is too big) and re-run nickel

     # >

2. Check the memory utilization of servers by running the following commands

     # top

     # glance -m

3. Run the nickel when the server is free

*I was using a very old version of nickel from 2007/2008

No comments:

Post a Comment