Solved

Script to collect crash information

Posted on 2003-11-13
4
360 Views
Last Modified: 2013-12-27
I would like to compose a script that will automatically take crash information files and move them to a directory called /admin/<companyname><currentdate> when run.  I am a Lotus Notes admin running Domino 5.0.12 on a Sun 5.0.8 server.  I have tried some simple scripts but to no avail. I'd be collecting info such as nsd's, of which there may be multiple. Also mulitple files called kill_SUNSPA_DATE in one directory.  I also have a problem as some other files reside in subdirectories such as /data/debug/ or data/screenlogs.  I have been reading entries in this forum for help with sample scripts but to no avail.  HELP PLEASE!  I 'd like to thank all in advance for any help.  Thanks again. -Jeff
0
Comment
Question by:jeffsmth66
  • 2
4 Comments
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
i do not know what u meant with crash information files.
but if u are looking for files when system crash(like panic), and system collect core dump files( unix.* and vmcore.* ).
this should be pretty simple. u have to move these files.

please be more elaborate of the problem.
0
 

Author Comment

by:jeffsmth66
Comment Utility
I am sorry if I was vague in my initial post.  Yes, I would like help with a syntax of writing the script to move files from a server crash.  It would be like nsd_all* or kill_all_SUNSPA*.  Also there are some debug files that reside in subdirectories such as data/debug/DEBUG.TXT.  I have tried simple scripts but always end up with errors in syntax.  Any help is appreciated. Thanks!
0
 
LVL 24

Accepted Solution

by:
shivsa earned 500 total points
Comment Utility
This is one kind of prototype u can use to move all these files.
u have to modify to correct all the directory locations and all.

line 2-5 not used in program but u can make it use.
if u had something else in mind then i would suggest let me know, if i understood u correctly or post your script i will try to make it work.

========
#!/bin/sh
NSD_LOGS="/data/nsd"
SUNSPA_LOGS="/data/sunspa"
DEBUG_FILES="/data/debug/"
SCREENS_FILES="/data/screenlogs/"
date=`date +%m%d%y`
DEST=/admin/jeff.$date
echo "Moving Server Crash files to $DEST"
mkdir $DEST

echo "Moving nsd's directories from source "
mv /data/nsd* $DEST

echo "Moving SUNSPA's files $DEST"
mv /data/*SUNSPA* $DEST

echo "moving debug files to $DEST"
mkdir $DEST/debug
mv /data/debug/* $DEST/debug/

echo "Moving screens files to $DEST"
mkdir /$DEST/screenlogs
mv /data/screenlogs/* /$DEST/screenlogs/

echo "Finished moving all the crash files"
==============
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now