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 user ID of super-user. 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 is satisfied with that event message and returns 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 an error is encountered during the read, the read is terminated and errno is set.
RETURN VALUE
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, 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
Hewlett-Packard Company — HP-UX Release 8.05: June 1991