Oculusd 0.11 is out! You can download it here. I implemented the monitor thread, and plugins can now easily register functions to be called every N seconds. This is made as simple as possible, just like the commands in the plugins. Adding monitor threads in your plugin is as simple as defining the functions, and defining a plugin_monitors array:

struct mon_table plugin_monitors[] = {
 { "monitor_disk", 10, 0, MSTAT_RUNNING },
 { "monitor_free", 5, 0, MSTAT_RUNNING },
 { NULL, 0, 0, 0 }

int monitor_disk() {
 oc_writelog("(disk monitor)\n");
 return MONITOR_OK;

int monitor_free() {
 oc_writelog("(freespace monitor)\n");
 return MONITOR_OK;

Oculusd 0.11 includes a new plugin, libocp_disk that registers these monitors. More work is on its way obviously:

  • implement commands to control the monitors (start/stop),
  • implement commands to list the monitors,
  • and misc stuff; complete the disk plugin, testing, etc.

Mind you, oculusd is still Very Beta. It is NOT in production use yet (not even by me) and it might crash your server or eat your homework. The goal is a Real Beta (Google-style) and have it running in production use. For that, some more testing is needed and extra functionalities. Keep an eye on this blog for it.

Categorieën: GeekstuffOculus

0 reacties

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Deze website gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.