Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Script to collect crash information

Posted on 2003-11-13
4
Medium Priority
?
380 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
3 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 2000 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

Independent Software Vendors: 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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

810 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