Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Script to check if files exits Post 303002139 by RudiC on Friday 18th of August 2017 08:06:26 AM
Old 08-18-2017
With a rate of 1 coredumps per 3 minutes I'd rather hurry up to find the malbehaving application, seriously!

In lieu of moving the files after they show up, how about creating them in the right location immediately? Depending on the OS (which you fail to mention) there are various mechanisms to define how the core dump filename will be constucted. man core:
- The name of the file is controlled via the sysctl(8) variable kern.corefile (FreeBSD)
- ... the /proc/sys/kernel/core_pattern file ... can be set to define a template that ... to name core dump files (since Linux 2.6 and 2.4.21)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script exits with $? not 0 randomly, how can I see what command failed?

Hi! I have this situation with 3 shellscripts. One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1. Script 1 in turn runs script 2 (import_catalogs_buyer.sh) Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies

2. Shell Programming and Scripting

perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies

3. Shell Programming and Scripting

Exits from putty instead of shell script

Dear, I have written below code to initiate the log at top of my script. #Set the log file LOGFILE=<path>/<filename.log> exec > $LOGFILE 2>&1 ............... .... ... .. ............ echo -e "\n\n Script finished OK " `date "+%m/%d/%y %H:%M:%S" ` "\n\n" exit 0 the logging ends only... (14 Replies)
Discussion started by: Imran_Chennai
14 Replies

4. Shell Programming and Scripting

'script' command exits immediately

I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies

5. Shell Programming and Scripting

need a shell script to extract the files from source file and check whether those files existonserve

Hi, I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is # echo $0 -sh My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies

6. Shell Programming and Scripting

Check when user exits SUDO

Hello to everyone, I'm new here and would like to thank everybody for the upcoming support, I know that I will have my question answered here, this community is huge. :) First of all, I´m a DBA and work on a daily basis on Unix environments of all kinds (HP-UX, Solaris, AIX, etc). I have... (8 Replies)
Discussion started by: ZeroBR
8 Replies

7. UNIX for Dummies Questions & Answers

Script dosent exits after executing the script

Hi i wrote a script which dosent exists after executing any help #!/bin/bash netstat -ptlen | grep 10000 if ; then echo "Hive Thrift server is running" exit 0 else echo "Hive Thrift server is down Trying to Bring up the service" | mail -s "ALERT" team@domain.com `nohup hive... (7 Replies)
Discussion started by: vikatakavi
7 Replies

8. Shell Programming and Scripting

Ssh bash script exits without remote command completion

Hi, My goal is to connect from unix server A to windows server B and call a bat file on windows. I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success. Can you please help me in... (4 Replies)
Discussion started by: pxp018
4 Replies

9. Shell Programming and Scripting

Script exits when using UNIX2dos / dos2UNIX

I'm not sure why but my script quits automatically at the point where unix2dos / dos2unix command is used. :confused::confused::confused: How do a fix it? LOG_FILE=MADDY.txt unix2dos ${LOG_FILE} exec 2> $LOG_FILE 1>&2 echo ${LOG_FILE} The script exists after the below... (3 Replies)
Discussion started by: machomaddy
3 Replies

10. UNIX for Beginners Questions & Answers

Bash script to compare file all the files exits or not

Currently i am building a script like based on region parameter it will filter the records in config file and then it will create a text file like ab.txt and it will read the path location in that file and now i need to compare the files name in the config file to files in the path of the config... (1 Reply)
Discussion started by: saranath
1 Replies
CORE(5) 						      BSD File Formats Manual							   CORE(5)

NAME
core -- memory image file format SYNOPSIS
#include <sys/param.h> DESCRIPTION
A small number of signals which cause abnormal termination of a process also cause a record of the process's in-core state to be written to disk for later examination by one of the available debuggers. (See sigaction(2).) This memory image is written to a file named by default programname.core in the working directory; provided the terminated process had write permission in the directory, and provided the abnormal- ity did not cause a system crash. (In this event, the decision to save the core file is arbitrary, see savecore(8).) The maximum size of a core file is limited by setrlimit(2). Files which would be larger than the limit are not created. The name of the file is controlled via the sysctl(8) variable kern.corefile. The contents of this variable describes a filename to store the core image to. This filename can be absolute, or relative (which will resolve to the current working directory of the program generating it). The following format specifiers may be used in the kern.corefile sysctl to insert additional information into the resulting core file name: %H Machine hostname. %I An index starting at zero until the sysctl debug.ncores is reached. This can be useful for limiting the number of corefiles generated by a particular process. %N process name. %P processes PID. %U process UID. The name defaults to %N.core, yielding the traditional FreeBSD behaviour. By default, a process that changes user or group credentials whether real or effective will not create a corefile. This behaviour can be changed to generate a core dump by setting the sysctl(8) variable kern.sugid_coredump to 1. Corefiles can be compressed by the kernel if the following items are included in the kernel configuration file: options COMPRESS_USER_CORES devices gzio When COMPRESS_USER_CORES is included the following sysctls can control if core files will be compressed: kern.compress_user_cores_gzlevel Gzip compression level. Defaults to -1. kern.compress_user_cores Actually compress user cores. Core files will have the suffix .gz appended to them. EXAMPLES
In order to store all core images in per-user private areas under /var/coredumps, the following sysctl(8) command can be used: sysctl kern.corefile=/var/coredumps/%U/%N.core SEE ALSO
gdb(1), kgdb(1), setrlimit(2), sigaction(2), sysctl(8) HISTORY
A core file format appeared in Version 6 AT&T UNIX. BSD
November 22, 2012 BSD
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy