?
Solved

Script to collect crash information

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

777 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