Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ diag0(7) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(2)

close(2)

read(2)

DIAG0(7)  —  Series 800 Only

NAME

diag0 − diagnostic interface to I/O subsystem

SYNOPSIS

pseudo-device diag0

DESCRIPTION

Diag0 is the diagnostic global port for the system.  All diagnostic events are sent to it on subqueue one. 

The only commands that diag0 supports are open(2), close(2), and read(2).  The open(2)command is exclusive and the opening process must have an effective super-user user ID.  A read of the diagnostic device file returns a diagnostic event message. If a diagnostic event has been logged since the last read, the next read call will be satisfied with that event message and will return immediately.  If no diagnostic events are queued and waiting, the process that made the read call is put to sleep waiting for an event to be sent to the diagnostic port. When an event finally arrives, the sleeping process is awakened and the read is satisfied.  If during the read an error is encountered, the read will be terminated and errno will be set. 

RETURNS

Upon successful completion, a zero is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. 

Diag0 does not support any ioctl(2) calls or write(2) commands.  If either command is issued then the following error is returned:

[ENODEV] ioctl not supported. 

[EBADF] write not supported. 

When opening diag0 the following errors may be returned:

[EPERM] permission denied, not superuser. 

[EBUSY] device file already opened. 

When attempting a read of diag0 the following errors may be returned:

[EIO] error occurred while retrieving message. 

[ENXIO] unknown message type received. 

AUTHOR

Diag0 was developed by HP. 

FILES

/dev/diag0
/hp-ux

SEE ALSO

open(2), close(2), read(2). 

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026