Sponsored Content
Top Forums Shell Programming and Scripting how i can read vmcore.x (x=0,1,...) file Post 302256568 by ashish_0101 on Monday 10th of November 2008 06:05:33 AM
Old 11-10-2008
will appreciate if someone gives the exact syntax for using mdb
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Post Shell programming: Question about source a file and read data from the file

This is shell programming assignment. It needs to create a file called .std_dbrc contains STD_DBROOT=${HOME}/class/2031/Assgn3/STD_DB (which includes all my simple database files) and I am gonna use this .std_dbrc in my script file (read the data from the database files) like this: .... (3 Replies)
Discussion started by: ccwq
3 Replies

2. Solaris

use sunexplorer and vmcore analysis result instead of vmcore dump file itself.

in solaris 8 environment,frequently os panic happened and someone advise me check vmcore.:( for crash dump facility can we use SUNEXPLORER data collector package including with analyse result of vmcore like ? It may provides panic message included program counter address, perhaps ... (3 Replies)
Discussion started by: mahadib
3 Replies

3. Shell Programming and Scripting

Need help with awk - how to read a content of a file from every file from file list

Hi Experts. I need to list the file and the filename comes from the file ListOfFile.txt. Basicly I have a filename "ListOfFile.txt" and it contain Example of ListOfFile.txt /home/Dave/Program/Tran1.P /home/Dave/Program/Tran2.P /home/Dave/Program/Tran3.P /home/Dave/Program/Tran4.P... (7 Replies)
Discussion started by: tanit
7 Replies

4. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

5. Shell Programming and Scripting

Read a file and search a value in another file create third file using AWK

Hi, I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file. ... (11 Replies)
Discussion started by: King Kalyan
11 Replies

6. Shell Programming and Scripting

bash: read file line by line (lines have '\0') - not full line has read???

I am using the while-loop to read a file. The file has lines with null-terminated strings (words, actually.) What I have by that reading - just a first word up to '\0'! I need to have whole string up to 'new line' - (LF, 10#10, 16#A) What I am doing wrong? #make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies

7. Solaris

I need to analyse some vmcore files

I need to analyse some vmcore files, do you guys know how can i get a free version of the "Solaris Crash Analysis Tool " (2 Replies)
Discussion started by: feg
2 Replies

8. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

9. Shell Programming and Scripting

Read from file and execute the read command

Hi, I am facing issues with the below: I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,). Now i want to read this command from file and execute it. So my code below is : Contents in the lookup.lkp file is : c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies

10. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
KDUMP.CONF(5)							File Formats Manual						     KDUMP.CONF(5)

NAME
kdump.conf - configuration file for kdump kernel. DESCRIPTION
kdump.conf is a configuration file for the kdump kernel crash collection service. kdump.conf provides post-kexec instructions to the kdump kernel. It is stored in the initrd file managed by the kdump service. If you change this file and do not want to restart before it takes effect, restart the kdump service to rebuild to initrd. For most configurations, you can simply review the examples provided in the stock /etc/kdump.conf. NOTE: For filesystem dump the dump target must be mounted before building kdump initramfs. kdump.conf only affects the behavior of the initramfs. Please read the kdump operational flow section of kexec-kdump-howto.txt in the docs to better understand how this configuration file affects the behavior of kdump. OPTIONS
raw <partition> Will dd /proc/vmcore into <partition>. Use persistent device names for partition devices, such as /dev/vg/<devname>. nfs <nfs mount> Will mount fs and copy /proc/vmcore to <mnt>/var/crash/%HOST-%DATE/, supports DNS. Note that a fqdn should be used as the server name in the mount point ssh <user@server> Will scp /proc/vmcore to <user@server>:/var/crash/%HOST-%DATE/, supports DNS. NOTE: make sure user has necessary write permissions on server and that a fqdn is used as the server name sshkey <path> Specifies the path of the ssh key you want to use when do ssh dump, the default value is /root/.ssh/kdump_id_rsa. <fs type> <partition> Will mount -t <fs type> <partition> /mnt and copy /proc/vmcore to /mnt/var/crash/%DATE/. NOTE: <partition> can be a device node, label or uuid. It's recommended to use persistent device names such as /dev/vg/<devname>. Otherwise it's suggested to use label or uuid. path <path> Append path to the filesystem device which you are dumping to. Ignored for raw device dumps. If unset, will default to /var/crash. core_collector <command> <options> This allows you to specify the command to copy the vmcore. You could use the dump filtering program makedumpfile, the default one, to retrieve your core, which on some arches can drastically reduce core file size. See /sbin/makedumpfile --help for a list of options. Note that the -i and -g options are not needed here, as the initrd will automatically be populated with a config file appropriate for the running kernel. Note 1: About default core collector: Default core_collector for raw/ssh dump is: "makedumpfile -F -l --message-level 1 -d 31". Default core_collector for other targets is: "makedumpfile -l --message-level 1 -d 31". Even if core_collector option is commented out in kdump.conf, makedumpfile is default core collector and kdump uses it internally. If one does not want makedumpfile as default core_collector, then they need to specify one using core_collector option to change the behavior. Note 2: If "makedumpfile -F" is used then you will get a flattened format vmcore.flat, you will need to use "makedumpfile -R" to rearrange the dump data from stdard input to a normal dumpfile (readable with analysis tools). ie. "makedumpfile -R vmcore < vmcore.flat" kdump_post <binary | script> This directive allows you to run a specified executable just after the memory dump process terminates. The exit status from the dump process is fed to the kdump_post executable, which can be used to trigger different actions for success or failure. Note that scripts written for use with this directive must use the /bin/bash interpreter kdump_pre <binary | script> Works just like the kdump_post directive, but instead of running after the dump process, runs immediately before. Exit status of this binary is interpreted as follows: 0 - continue with dump process as usual non 0 - reboot the system Note that scripts written for this directive must use the /bin/bash interpreter extra_bins <binaries | shell scripts> This directive allows you to specify additional binaries or shell scripts you'd like to include in your kdump initrd. Generally only useful in conjunction with a kdump_post binary or script that relies on other binaries or scripts. extra_modules <module(s)> This directive allows you to specify extra kernel modules that you want to be loaded in the kdump initrd, typically used to set up access to non-boot-path dump targets that might otherwise not be accessible in the kdump environment. Multiple modules can be listed, separated by a space, and any dependent modules will automatically be included. default <reboot | halt | poweroff | shell | dump_to_rootfs> Action to preform in case dumping to intended target fails. If no default action is specified, "reboot" is assumed default. reboot: If the default action is reboot simply reboot the system (this is what most people will want, as it returns the system to a nominal state). shell: If the default action is shell, then drop to an shell session inside the initramfs from where you can manually pre- form additional recovery actions. Exiting this shell reboots the system. halt: bring the system to a halt, requiring manual reset poweroff: The system will be powered down. dump_to_rootfs:If the default action is dump_to_rootfs, specified root will be mounted and dump will be saved in "path" directory. Note: kdump uses bash as the default shell. force_rebuild <0 | 1> By default, kdump initrd only will be rebuilt when necessary. Specify 1 to force rebuilding kdump initrd every time when kdump ser- vice starts. override_resettable <0 | 1> Usually a unresettable block device can't be dump target. Specifying 1 means though block target is unresettable, user understand this situation and want to try dumping. By default, it's set to 0, means not to try a destined failure. dracut_args <arg(s)> Kdump uses dracut to generate initramfs for second kernel. This option allows a user to pass arguments to dracut directly. DEPRECATED OPTIONS
net <nfs mount>|<user@server> net option is replaced by nfs and ssh options. Use nfs or ssh options directly. options <module> <option list> Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump to add proper module option as kernel command line params. Such as append loop.max_loop=1 to limit maximum loop devices to 1. link_delay <seconds> link_delay was used to wait a network device to initialize before using it. Now dracut network module take care of this issue auto- maticlly. disk_timeout <seconds> Similar to link_delay, dracut ensures disks being ready before kdump uses them. debug_mem_level <0-3> This was used to turns on debug/verbose output of kdump scripts regarding free/used memory at various points of execution. This feature has been moved to dracut now. Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump and append dracut cmdline param rd.memdebug=[0-3] to enable the debug output. Higher level means more debugging output. 0 - no output 1 - partial /proc/meminfo 2 - /proc/meminfo 3 - /proc/meminfo + /proc/slabinfo blacklist <list of kernel modules> blacklist option was recently being used to prevent loading modules in initramfs. General terminology for blacklist has been that module is present in initramfs but it is not actually loaded in kernel. Hence retaining blacklist option creates more confusing behavior. It has been deprecated. Instead use rd.driver.blacklist option on second kernel to blacklist a certain module. One can edit /etc/sysconfig/kdump.conf and edit KDUMP_COMMANDLINE_APPEND to pass kernel command line options. Refer to dracut.cmdline man page for more details on module blacklist option. EXAMPLES
Here is some examples for core_collector option: Core collector command format depends on dump target type. Typically for filesystem (local/remote), core_collector should accept two argu- ments. First one is source file and second one is target file. For ex. ex1. core_collector "cp --sparse=always" Above will effectively be translated to: cp --sparse=always /proc/vmcore <dest-path>/vmcore ex2. core_collector "makedumpfile -l --message-level 1 -d 31" Above will effectively be translated to: makedumpfile -l --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore For dump targets like raw and ssh, in general, core collector should expect one argument (source file) and should output the processed core on standard output (There is one exception of "scp", discussed later). This standard output will be saved to destination using appropriate commands. raw dumps examples: ex3. core_collector "cat" Above will effectively be translated to. cat /proc/vmcore | dd of=<target-device> ex4. core_collector "makedumpfile -F -l --message-level 1 -d 31" Above will effectively be translated to. makedumpfile -F -l --message-level 1 -d 31 | dd of=<target-device> ssh dumps examples ex5. core_collector "cat" Above will effectively be translated to. cat /proc/vmcore | ssh <options> <remote-location> "dd of=path/vmcore" ex6. core_collector "makedumpfile -F -l --message-level 1 -d 31" Above will effectively be translated to. makedumpfile -F -l --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore" There is one exception to standard output rule for ssh dumps. And that is scp. As scp can handle ssh destinations for file trans- fers, one can specify "scp" as core collector for ssh targets (no output on stdout). ex7. core_collector "scp" Above will effectively be translated to. scp /proc/vmcore <user@host>:path/vmcore examples for other options please see /etc/kdump.conf SEE ALSO
kexec(8) mkdumprd(8) dracut.cmdline(7) kexec-tools 07/23/2008 KDUMP.CONF(5)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy