LoadLeveler provides the GetHistory subroutine to generate accounting reports.
GetHistory processes local or global LoadLeveler history files.
LoadLeveler API library libllapi.a
#include "llapi.h" int GetHistory(char *filename, int (*func) (LL_job *), int version);
GetHistory opens the history file you specify, reads one LL_job accounting record, and calls a user-supplied routine, passing to the routine the address of an LL_job structure. GetHistory processes all history records one at a time and then closes the file. Any user can call this subroutine.
The user-supplied function must include the following files:
#include <sys/resource.h> #include <sys/types.h> #include <sys/time.h>
The ll_event_usage structure is part of the LL_job structure and contains the following LoadLeveler defined data:
GetHistory returns a zero when successful.
GetHistory returns -1 to indicate that the version is not supported or that an error occurred opening the history file.
Makefiles and examples which use this API are located in the samples/llphist subdirectory of the release directory. The examples include the executable llpjob, which invokes GetHistory to print every record in the history file. In order to compile llpjob, the sample Makefile must update the RELEASE_DIR field to represent the current LoadLeveler release directory. The syntax for llpjob is:
llpjob history_file
Where history_file is a local or global history file.