Novell Home

CLIB: get server utilization - sample 3

From Developer Community

This code shows how to use SSGetFileServerInfo() to determine the utilization of the local NetWare server.

Sample Code

#include <nit/nwservst.h>
#include <nwerrno.h>
#include <stdio.h>
#include <stdlib.h>

int main( void) {
   GetFileServerInfoStructure fs_info;
   if ( SSGetFileServerInfo(( void*) &fs_info, sizeof( fs_info)) != ESUCCESS) {
      perror( "SSGetFileServerInfo");
      return EXIT_FAILURE;
   }
   printf( "fs_info.serverUtilization = %u\n", fs_info.serverUtilization);
   return EXIT_SUCCESS;
}

--Dmitry Mityugov

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.