kvm_dump_inval man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

KVM_DUMP(3)		 BSD Library Functions Manual		   KVM_DUMP(3)

NAME
     kvm_dump_mkheader, kvm_dump_wrtheader, kvm_dump_inval — crash dump sup‐
     port functions

LIBRARY
     Kernel Data Access Library (libkvm, -lkvm)

SYNOPSIS
     #include <kvm.h>

     int
     kvm_dump_mkheader(kvm_t *kd, off_t dump_off);

     int
     kvm_dump_wrtheader(kvm_t *kd, FILE *fp, int dumpsize);

     int
     kvm_dump_inval(kvm_t *kd);

DESCRIPTION
     First note that the functions described here were designed to be used by
     savecore(8).

     The function kvm_dump_mkheader() checks if the physical memory file asso‐
     ciated with kd contains a valid crash dump header as generated by a dump‐
     ing kernel.  When a valid header is found, kvm_dump_mkheader() initial‐
     izes the internal kvm data structures as if a crash dump generated by the
     savecore(8) program was opened.  This has the intentional side effect of
     enabling the address translation machinery.

     A call to kvm_dump_mkheader() will most likely be followed by a call to
     kvm_dump_wrtheader().  This function takes care of generating the generic
     header, the CORE_CPU section and the section header of the CORE_DATA sec‐
     tion.  The data is written to the file pointed at by fp.  The dumpsize
     argument is only used to properly the set the segment size of the
     CORE_DATA section.	 Note that this function assumes that fp is positioned
     at file location 0.  This function will not seek and therefore allows fp
     to be a file pointer obtained by zopen().

     The kvm_dump_inval() function clears the magic number in the physical
     memory file associated with kd.  The address translations must be enabled
     for this to work (thus assuming that kvm_dump_mkheader() was called ear‐
     lier in the sequence).

RETURN VALUES
     All functions except kvm_dump_mkheader() return 0 on success, -1 on fail‐
     ure.  The function kvm_dump_mkheader() returns the size of the headers
     present before the actual dumpdata starts.	 If no valid headers were
     found but no fatal errors occurred, 0 is returned.	 On fatal errors the
     return value is -1.

     In the case of failure, kvm_geterr(3) can be used to retrieve the cause
     of the error.

SEE ALSO
     kvm(3), kvm_open(3)

HISTORY
     These functions first appeared in NetBSD 1.2.

BSD				March 17, 1996				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net