Solved

Script to collect crash information

Posted on 2003-11-13
4
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9743024
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
ID: 9743666
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
ID: 9744088
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

724 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