unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



nvlogpg(8)							   nvlogpg(8)



NAME

  nvlogpg - Display the	log file of an AdvFS file domain

SYNOPSIS

  /sbin/advfs/nvlogpg log_id

  /sbin/advfs/nvlogpg [-v  | -B] log_id	page [record_offset [-f]]

  /sbin/advfs/nvlogpg [-v  | -B] log_id	{ -R  |	-a  }

  /sbin/advfs/nvlogpg [-v  | -B] log_id	{ -s  |	-e  } [page_offset]

  /sbin/advfs/nvlogpg domain_id	| volume_id -d dump_file

  /sbin/advfs/nvlogpg [-v  | -B] volume_id -b block

OPTIONS

  -a  Specifies	that all the pages in the log file be displayed.

  -B  Brief.  Specifies	that only the transaction id for each log file entry
      be displayed.

  -b block
      Specifies	the logical block number of a disk block on an AdvFS volume.

  -d dump_file
      Specifies	the name of a file that	will hold the contents of the speci-
      fied log file.

  -e  Specifies	that the last active record in the log file--the end of	the
      log file--is to be displayed.

  -f  Specifies	that all subtransactions of the	parent transaction are to be
      followed.

  -s  Specifies	that the first active record in	the log	file--the start	of
      the log file--is to be displayed.

  -v  Verbose.	Display	all the	data in	a specified log, page, or record.

OPERANDS

  log_id
      Specifies	a log file in an AdvFS domain or a log file that has been
      saved by the utility as a	dump_file.  Use	the following format:

      domain_id	| volume_id | [-F] dump_file
	  Specify the -F option	to force the utility to	interpret the name
	  you supply as	a file name.

  domain_id
      Specifies	an AdvFS file domain using the following format:

      [-r] [-D]	domain
	  By default, the utility opens	all volumes using block	device spe-
	  cial files. Specify the -r option to operate on the raw device
	  (character device special file) of the domain	instead	of the block
	  device. Specify the [-D] option to force the utility to interpret
	  the name you supply in the domain argument as	a domain name.

  volume_id
      Specifies	an AdvFS volume	using the following format:

      [-V] volume | domain_id volume_index
	  Specify the -V option	to force the utility to	interpret the name
	  you supply in	the volume argument as a volume	name. The volume name
	  argument also	can be a full or partial path for the volume, for
	  example /dev/disk/dsk12a or dsk12a. Specifying a partial path	name
	  always opens the character device special file.

	  Alternatively, specify the volume by using arguments for its
	  domain, domain_id, and its volume index number, volume_index.

  dump_file
      Specifies	the name of a file that	contains the output from this util-
      ity.

  page
      Specifies	the file page number of	a file.

  page_offset
      Specifies	the offset relative to the start or the	end of the active
      region in	the log	file.

  record_offset
      Specifies	a byte offset in a page	of the log file.

DESCRIPTION

  The nvlogpg command locates the log file of an AdvFS file domain and
  displays records from	it in various ways.

  The log file for a domain is a bitfile, organized as an array	of 8 Kbyte
  disk pages.  Each page  consists of a	fixed-size header record, a number of
  variable-sized data records, and a fixed-size	trailer	record.	Each data
  record consists of a fixed-size header and a variable	amount of data.

  The log file for a domain contains the metadata, the log, of each transac-
  tion.	 Before	a transaction is written to disk, its logged metadata is
  written to disk.  Because the	log of a transaction contains the information
  necessary to redo the	transaction, the file system can maintain consistency
  on disk and recover from system failures when	they occur. These transac-
  tions	and the	metadata they include are used to replay transactions that
  did not complete, for	example	if the system crashed, when the	domain is
  next activated.

  Displaying a Summary


  You can specify a domain or volume name to display a summary of the log
  file that includes its location, size, and the location of its starting and
  ending records.

  For example, to display a summary of the log file for	domain domain_1,
  enter	the following command:

       # /sbin/advfs/nvlogpg domain_1






  Displaying Log File Pages and	Records


  There	are several ways you can specify log file pages	and records.

  To display page five of a log	file for a domain that you know	is on device
  rz5a,	enter the following command:

       # /sbin/advfs/nvlogpg rz5a 5

  To display the record	at byte	offset 234 in page seven of the	log file in
  the domain named domain_1, enter the following command:

       # /sbin/advfs/nvlogpg domain_1 7	234

  You can use the command to find the start or the end of the active log.
  The start of the log is the first record  whose data is not yet written to
  the metadata files.  The end of the log is the last record that has been
  written to the log. For example, to display the first	record in domain
  domain_1 whose record	is not yet written to metadata files, enter the	fol-
  lowing command:

       # /sbin/advfs/nvlogpg domain_1 -s

  To display the end of	the log	in domain domain_1--the	last record that has
  been written to the log--enter the following command:

       # /sbin/advfs/nvlogpg domain_1 -e

  You can use the utility to display pages and records that are	before or
  after	the start or the end of	the active log.	 For example, to display the
  second page after the	start of the log file for domain_1, enter the follow-
  ing command:

       # /sbin/advfs/nvlogpg domain_1 -s 2

  To display the page before the end of	the log	for domain_1, enter the	fol-
  lowing comand:

       # /sbin/advfs/nvlogpg domain_1 -e -1

  To display the record	at byte	offset 234 on the page of the log that holds
  the last log record in the log file for domain_1, enter the following	com-
  mand:

       # /sbin/advfs/nvlogpg domain_1 -e 0 234

  The page offset is relative to the page that contains	the start and end
  records of the log file.  Note that the record offset	is relative to the
  specified page.

  Following a Transaction


  The utility can follow the log records that belong to	one transaction.  For
  example, you can follow a set	of log records from one	transaction by speci-
  fying	a record and the -f option.


  Specify one particular log record and	specify	the -f option.	For example,
  to display the log record at page 1, byte offset 128,	and all	the following
  records that belong to the same transaction, enter:

       # /sbin/advfs/nvlogpg domain_1 1	128 -f

  Because the -S option	also specifies one record, the -f option can be	used
  with it.  For	example:

       # /sbin/advfs/nvlogpg domain_1 -s -f

  Saving and Examining the Log File


  You can use the command to write the log file	to another file, a dump_file,
  and later use	the command to examine it.

  For example, you can extract the log file for	domain domain_1	and write it
  to a file named domain_1_log by entering the following command:

       # /sbin/advfs/nvlogpg domain_1 -d domain_1_log

  Later, you can examine the log file you extracted.  You use the same com-
  mand syntax on the file as you did for the log in the	domain,	except you
  use the -F option to force the utility to interpret the name as a file
  name,	in case	there is a domain or volume with the same name.

  For example, you can display a summary of the	file, domain_1_log by enter-
  ing the following command:

       # /sbin/advfs/nvlogpg -F	domain_1_log

NOTES

  An active domain, which is a domain with one or more of its filesets
  mounted, has all of its volumes opened using block device special files.
  These	devices	cannot be opened a second time without first being unmounted.
  However, the character device	special	files for the volumes can be opened
  more than once while still mounted.

  It can be misleading to use this utility on a	domain with mounted filesets
  because the utility does not synchronize its read requests with AdvFS	file
  domain read and write	requests.

  For example, the AdvFS can be	writing	to the disk as the utility is reading
  from the disk.  Therefore, when you run the utility, metadata	may not	have
  been flushed in time for the utility to read it and consecutive reads	of
  the same file	page may return	unpredictable or contradictory results.	[The
  domain is not	harmed.]

  To avoid this	problem, unmount all the fileset in the	domain before using
  this utility.

RESTRICTIONS

  The utility can fail to open a block device, even when there are no
  filesets mounted for the domain and the AdvFS	daemon,	advfsd,	is running.
  The daemon, as it runs, activates the	domain for a brief time.  If the
  nvlogpg utility fails	in this	situation, run it again.








EXIT STATUS

  The utility returns a	0 (zero) on success, otherwise it returns a nonzero
  value	and an error diagnostic.


FILES

  /sbin/advfs/nvlogpg
      Specifies	the command path.

  /etc/fdmns/domain_name
      Specifies	the volumes in the domain.

SEE ALSO

  Commands: nvbmtpg(8),	nvfragpg(8), tag2name(8), vfilepg(8), vsbmpg(8)

  Files: advfs(4)