Solved

Script to collect crash information

Posted on 2003-11-13
4
370 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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 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…
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…

730 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