Creating the monitor file

The monitor file corresponding to the event must be created to monitor an event.

Before monitoring an event, the monitor file corresponding to the event must be created. The AIX® Event Infrastructure does support open() with the O_CREAT flag. As an example, we will follow the steps required to monitor the file system /filesys/clj-fs for a utilization of 90%.

  • The necessary subdirectories must also be created:
    mkdir /aha/fs/utilFs.monFactory/filesys
  • Open the file /aha/fs/utilFs.monFactory/filesys/clj-fs.mon.
Before a monitor file can be created, the AIX Event Infrastructure kernel extension will call the event producer to determine if the event being requested is valid and to determine if the user has sufficient authority to monitor the specified event. Here are some of the common errors which can be returned from a monitor file create or open:
Table 1. Return Codes
Return Code Details

There is no event corresponding to the path specified.

Note: An ENODEV error may still be returned when trying to open an existing monitor file when the event no longer exists.

User does not have permission to monitor the specified event.


The event specified does not support monitoring by AIX Event Infrastructure.