Further adaptions to generic output, support of JSON output (partially complete).
parent
8525f9734c
commit
20ebeb71b8
|
@ -9,6 +9,7 @@
|
||||||
void PrintEarlyHeader();
|
void PrintEarlyHeader();
|
||||||
void PrintHeader(int argc, char **argv);
|
void PrintHeader(int argc, char **argv);
|
||||||
void ShowTestInfo(IOR_param_t *params);
|
void ShowTestInfo(IOR_param_t *params);
|
||||||
|
void ShowTestEnd(IOR_test_t *tptr);
|
||||||
void ShowSetup(IOR_param_t *params);
|
void ShowSetup(IOR_param_t *params);
|
||||||
void ShowTest(IOR_param_t * test);
|
void ShowTest(IOR_param_t * test);
|
||||||
void PrintShortSummary(IOR_test_t * test);
|
void PrintShortSummary(IOR_test_t * test);
|
||||||
|
|
222
src/ior-output.c
222
src/ior-output.c
|
@ -16,14 +16,128 @@ static double mean_of_array_of_doubles(double *values, int len);
|
||||||
static void PPDouble(int leftjustify, double number, char *append);
|
static void PPDouble(int leftjustify, double number, char *append);
|
||||||
|
|
||||||
void PrintTableHeader(){
|
void PrintTableHeader(){
|
||||||
fprintf(out_resultfile, "\n");
|
if (outputFormat == OUTPUT_DEFAULT){
|
||||||
fprintf(out_resultfile, "access bw(MiB/s) block(KiB) xfer(KiB) open(s) wr/rd(s) close(s) total(s) iter\n");
|
fprintf(out_resultfile, "\n");
|
||||||
fprintf(out_resultfile, "------ --------- ---------- --------- -------- -------- -------- -------- ----\n");
|
fprintf(out_resultfile, "access bw(MiB/s) block(KiB) xfer(KiB) open(s) wr/rd(s) close(s) total(s) iter\n");
|
||||||
|
fprintf(out_resultfile, "------ --------- ---------- --------- -------- -------- -------- -------- ----\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int indent = 0;
|
||||||
|
|
||||||
|
static void PrintKeyValStart(char * key){
|
||||||
|
if (outputFormat == OUTPUT_DEFAULT){
|
||||||
|
for(int i=0; i < indent; i++){
|
||||||
|
fprintf(out_resultfile, " ");
|
||||||
|
}
|
||||||
|
fprintf(out_resultfile, "%s: ", key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"%s\": \"", key);
|
||||||
|
}else if(outputFormat == OUTPUT_CSV){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintNextToken(){
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, ", \n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintKeyValEnd(){
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"");
|
||||||
|
}
|
||||||
|
if (outputFormat == OUTPUT_DEFAULT){
|
||||||
|
fprintf(out_resultfile, "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintIndent(){
|
||||||
|
if(outputFormat == OUTPUT_CSV){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(int i=0; i < indent; i++){
|
||||||
|
fprintf(out_resultfile, " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintKeyVal(char * key, char * value){
|
||||||
|
if(value[strlen(value) -1 ] == '\n'){
|
||||||
|
// remove \n
|
||||||
|
value[strlen(value) -1 ] = 0;
|
||||||
|
}
|
||||||
|
PrintIndent();
|
||||||
|
if (outputFormat == OUTPUT_DEFAULT){
|
||||||
|
fprintf(out_resultfile, "%s: %s\n", key, value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"%s\": \"%s\"", key, value);
|
||||||
|
}else if(outputFormat == OUTPUT_CSV){
|
||||||
|
fprintf(out_resultfile, "%s", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintKeyValInt(char * key, int64_t value){
|
||||||
|
PrintIndent();
|
||||||
|
if (outputFormat == OUTPUT_DEFAULT){
|
||||||
|
fprintf(out_resultfile, "%s: %lld\n", key, (long long) value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"%s\": %lld", key, (long long) value);
|
||||||
|
}else if(outputFormat == OUTPUT_CSV){
|
||||||
|
fprintf(out_resultfile, "%lld", (long long) value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintStartSection(){
|
||||||
|
indent++;
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "{\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintNamedSectionStart(char * key){
|
||||||
|
PrintIndent();
|
||||||
|
indent++;
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"%s\": {\n", key);
|
||||||
|
}else if(outputFormat == OUTPUT_DEFAULT){
|
||||||
|
fprintf(out_resultfile, "%s: \n", key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintEndSection(){
|
||||||
|
indent--;
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\n}\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintArrayStart(char * key){
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "\"%s\": [\n", key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintArrayEnd(){
|
||||||
|
if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, "]\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintTestEnds(){
|
void PrintTestEnds(){
|
||||||
fprintf(out_resultfile, "\n");
|
if (rank != 0 || verbose < VERBOSE_0) {
|
||||||
fprintf(out_resultfile, "Finished: %s", CurrentTimeString());
|
PrintEndSection();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintKeyVal("Finished", CurrentTimeString());
|
||||||
|
PrintEndSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintReducedResult(IOR_test_t *test, int access, double bw, double *diff_subset, double totalTime, int rep){
|
void PrintReducedResult(IOR_test_t *test, int access, double bw, double *diff_subset, double totalTime, int rep){
|
||||||
|
@ -60,49 +174,59 @@ void PrintHeader(int argc, char **argv)
|
||||||
|
|
||||||
if (rank != 0)
|
if (rank != 0)
|
||||||
return;
|
return;
|
||||||
|
PrintStartSection();
|
||||||
|
|
||||||
fprintf(out_resultfile, "Began: %s", CurrentTimeString());
|
PrintKeyVal("Began", CurrentTimeString());
|
||||||
fprintf(out_resultfile, "Command line used: %s", argv[0]);
|
PrintNextToken();
|
||||||
|
PrintKeyValStart("Command line");
|
||||||
|
fprintf(out_resultfile, "%s", argv[0]);
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
fprintf(out_resultfile, " \"%s\"", argv[i]);
|
fprintf(out_resultfile, " %s", argv[i]);
|
||||||
}
|
}
|
||||||
fprintf(out_resultfile, "\n");
|
PrintKeyValEnd();
|
||||||
|
PrintNextToken();
|
||||||
if (uname(&unamebuf) != 0) {
|
if (uname(&unamebuf) != 0) {
|
||||||
EWARN("uname failed");
|
EWARN("uname failed");
|
||||||
fprintf(out_resultfile, "Machine: Unknown");
|
PrintKeyVal("Machine", "Unknown");
|
||||||
} else {
|
} else {
|
||||||
fprintf(out_resultfile, "Machine: %s %s", unamebuf.sysname,
|
PrintKeyValStart("Machine");
|
||||||
|
fprintf(out_resultfile, "%s %s", unamebuf.sysname,
|
||||||
unamebuf.nodename);
|
unamebuf.nodename);
|
||||||
if (verbose >= VERBOSE_2) {
|
if (verbose >= VERBOSE_2) {
|
||||||
fprintf(out_resultfile, " %s %s %s", unamebuf.release,
|
fprintf(out_resultfile, " %s %s %s", unamebuf.release,
|
||||||
unamebuf.version, unamebuf.machine);
|
unamebuf.version, unamebuf.machine);
|
||||||
}
|
}
|
||||||
|
PrintKeyValEnd();
|
||||||
}
|
}
|
||||||
fprintf(out_resultfile, "\n");
|
|
||||||
#ifdef _NO_MPI_TIMER
|
#ifdef _NO_MPI_TIMER
|
||||||
if (verbose >= VERBOSE_2)
|
if (verbose >= VERBOSE_2)
|
||||||
fprintf(out_resultfile, "Using unsynchronized POSIX timer\n");
|
fprintf(out_logfile, "Using unsynchronized POSIX timer\n");
|
||||||
#else /* not _NO_MPI_TIMER */
|
#else /* not _NO_MPI_TIMER */
|
||||||
if (MPI_WTIME_IS_GLOBAL) {
|
if (MPI_WTIME_IS_GLOBAL) {
|
||||||
if (verbose >= VERBOSE_2)
|
if (verbose >= VERBOSE_2)
|
||||||
fprintf(out_resultfile, "Using synchronized MPI timer\n");
|
fprintf(out_logfile, "Using synchronized MPI timer\n");
|
||||||
} else {
|
} else {
|
||||||
if (verbose >= VERBOSE_2)
|
if (verbose >= VERBOSE_2)
|
||||||
fprintf(out_resultfile, "Using unsynchronized MPI timer\n");
|
fprintf(out_logfile, "Using unsynchronized MPI timer\n");
|
||||||
}
|
}
|
||||||
#endif /* _NO_MPI_TIMER */
|
#endif /* _NO_MPI_TIMER */
|
||||||
if (verbose >= VERBOSE_1) {
|
if (verbose >= VERBOSE_1) {
|
||||||
fprintf(out_resultfile, "Start time skew across all tasks: %.02f sec\n",
|
fprintf(out_logfile, "Start time skew across all tasks: %.02f sec\n",
|
||||||
wall_clock_deviation);
|
wall_clock_deviation);
|
||||||
}
|
}
|
||||||
if (verbose >= VERBOSE_3) { /* show env */
|
if (verbose >= VERBOSE_3) { /* show env */
|
||||||
fprintf(out_resultfile, "STARTING ENVIRON LOOP\n");
|
fprintf(out_logfile, "STARTING ENVIRON LOOP\n");
|
||||||
for (i = 0; environ[i] != NULL; i++) {
|
for (i = 0; environ[i] != NULL; i++) {
|
||||||
fprintf(out_resultfile, "%s\n", environ[i]);
|
fprintf(out_logfile, "%s\n", environ[i]);
|
||||||
}
|
}
|
||||||
fprintf(out_resultfile, "ENDING ENVIRON LOOP\n");
|
fprintf(out_logfile, "ENDING ENVIRON LOOP\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PrintNextToken();
|
||||||
|
PrintArrayStart("tests");
|
||||||
fflush(out_resultfile);
|
fflush(out_resultfile);
|
||||||
|
fflush(out_logfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -110,15 +234,27 @@ void PrintHeader(int argc, char **argv)
|
||||||
*/
|
*/
|
||||||
void ShowTestInfo(IOR_param_t *params)
|
void ShowTestInfo(IOR_param_t *params)
|
||||||
{
|
{
|
||||||
fprintf(out_resultfile, "\n");
|
PrintStartSection();
|
||||||
fprintf(out_resultfile, "Test %d started: %s", params->id, CurrentTimeString());
|
PrintKeyValInt("TestID", params->id);
|
||||||
if (verbose >= VERBOSE_1) {
|
PrintNextToken();
|
||||||
/* if pvfs2:, then skip */
|
PrintKeyVal("StartTime", CurrentTimeString());
|
||||||
if (Regex(params->testFileName, "^[a-z][a-z].*:") == 0) {
|
PrintNextToken();
|
||||||
DisplayFreespace(params);
|
/* if pvfs2:, then skip */
|
||||||
}
|
if (Regex(params->testFileName, "^[a-z][a-z].*:") == 0) {
|
||||||
}
|
DisplayFreespace(params);
|
||||||
fflush(out_resultfile);
|
}
|
||||||
|
fflush(out_resultfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTestEnd(IOR_test_t *tptr){
|
||||||
|
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
||||||
|
if (tptr->params.stoneWallingStatusFile[0]){
|
||||||
|
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
||||||
|
}else{
|
||||||
|
fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PrintEndSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -126,20 +262,19 @@ void ShowTestInfo(IOR_param_t *params)
|
||||||
*/
|
*/
|
||||||
void ShowSetup(IOR_param_t *params)
|
void ShowSetup(IOR_param_t *params)
|
||||||
{
|
{
|
||||||
|
if (strcmp(params->debug, "") != 0) {
|
||||||
if (strcmp(params->debug, "") != 0) {
|
fprintf(out_logfile, "\n*** DEBUG MODE ***\n");
|
||||||
fprintf(out_resultfile, "\n*** DEBUG MODE ***\n");
|
fprintf(out_logfile, "*** %s ***\n\n", params->debug);
|
||||||
fprintf(out_resultfile, "*** %s ***\n\n", params->debug);
|
}
|
||||||
}
|
PrintNamedSectionStart("Flags");
|
||||||
fprintf(out_resultfile, "Summary:\n");
|
PrintKeyVal("api", params->apiVersion);
|
||||||
fprintf(out_resultfile, "\tapi = %s\n", params->apiVersion);
|
PrintNextToken();
|
||||||
fprintf(out_resultfile, "\ttest filename = %s\n", params->testFileName);
|
PrintKeyVal("test filename", params->testFileName);
|
||||||
fprintf(out_resultfile, "\taccess = ");
|
PrintNextToken();
|
||||||
fprintf(out_resultfile, params->filePerProc ? "file-per-process" : "single-shared-file");
|
PrintKeyVal("access", params->filePerProc ? "file-per-process" : "single-shared-file");
|
||||||
if (verbose >= VERBOSE_1 && strcmp(params->api, "POSIX") != 0) {
|
PrintNextToken();
|
||||||
fprintf(out_resultfile, params->collective == FALSE ? ", independent" : ", collective");
|
PrintKeyVal("type", params->collective == FALSE ? "independent" : "collective");
|
||||||
}
|
PrintNextToken();
|
||||||
fprintf(out_resultfile, "\n");
|
|
||||||
if (verbose >= VERBOSE_1) {
|
if (verbose >= VERBOSE_1) {
|
||||||
if (params->segmentCount > 1) {
|
if (params->segmentCount > 1) {
|
||||||
fprintf(out_resultfile,
|
fprintf(out_resultfile,
|
||||||
|
@ -200,6 +335,7 @@ void ShowSetup(IOR_param_t *params)
|
||||||
fprintf(out_resultfile, "\tUsing stonewalling = %d second(s)%s\n",
|
fprintf(out_resultfile, "\tUsing stonewalling = %d second(s)%s\n",
|
||||||
params->deadlineForStonewalling, params->stoneWallingWearOut ? " with phase out" : "");
|
params->deadlineForStonewalling, params->stoneWallingWearOut ? " with phase out" : "");
|
||||||
}
|
}
|
||||||
|
PrintEndSection();
|
||||||
fflush(out_resultfile);
|
fflush(out_resultfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,8 +579,6 @@ void DisplayFreespace(IOR_param_t * test)
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowFileSystemSize(fileName);
|
ShowFileSystemSize(fileName);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
28
src/ior.c
28
src/ior.c
|
@ -94,23 +94,14 @@ IOR_test_t * ior_run(int argc, char **argv, MPI_Comm world_com, FILE * world_out
|
||||||
}
|
}
|
||||||
|
|
||||||
TestIoSys(tptr);
|
TestIoSys(tptr);
|
||||||
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
|
||||||
if (tptr->params.stoneWallingStatusFile[0]){
|
|
||||||
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
|
||||||
}else{
|
|
||||||
fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tptr->results->errors = totalErrorCount;
|
tptr->results->errors = totalErrorCount;
|
||||||
|
ShowTestEnd(tptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintLongSummaryAllTests(tests_head);
|
PrintLongSummaryAllTests(tests_head);
|
||||||
|
|
||||||
/* display finish time */
|
/* display finish time */
|
||||||
if (rank == 0 && verbose >= VERBOSE_0) {
|
PrintTestEnds();
|
||||||
fprintf(out_logfile, "\n");
|
|
||||||
fprintf(out_logfile, "Finished: %s", CurrentTimeString());
|
|
||||||
}
|
|
||||||
return tests_head;
|
return tests_head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,14 +189,7 @@ int ior_main(int argc, char **argv)
|
||||||
fprintf(out_logfile, "\trank %d: awake.\n", rank);
|
fprintf(out_logfile, "\trank %d: awake.\n", rank);
|
||||||
}
|
}
|
||||||
TestIoSys(tptr);
|
TestIoSys(tptr);
|
||||||
|
ShowTestEnd(tptr);
|
||||||
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
|
||||||
if (tptr->params.stoneWallingStatusFile[0]){
|
|
||||||
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
|
||||||
}else{
|
|
||||||
fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose < 0)
|
if (verbose < 0)
|
||||||
|
@ -214,9 +198,7 @@ int ior_main(int argc, char **argv)
|
||||||
PrintLongSummaryAllTests(tests_head);
|
PrintLongSummaryAllTests(tests_head);
|
||||||
|
|
||||||
/* display finish time */
|
/* display finish time */
|
||||||
if (rank == 0 && verbose >= VERBOSE_0) {
|
PrintTestEnds();
|
||||||
PrintTestEnds();
|
|
||||||
}
|
|
||||||
|
|
||||||
DestroyTests(tests_head);
|
DestroyTests(tests_head);
|
||||||
|
|
||||||
|
@ -228,8 +210,6 @@ int ior_main(int argc, char **argv)
|
||||||
aws_cleanup();
|
aws_cleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fflush(out_logfile);
|
|
||||||
|
|
||||||
return totalErrorCount;
|
return totalErrorCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,17 +171,19 @@ void DecodeDirective(char *line, IOR_param_t *params)
|
||||||
if (strcasecmp(option, "api") == 0) {
|
if (strcasecmp(option, "api") == 0) {
|
||||||
strcpy(params->api, value);
|
strcpy(params->api, value);
|
||||||
} else if (strcasecmp(option, "summaryFile") == 0) {
|
} else if (strcasecmp(option, "summaryFile") == 0) {
|
||||||
out_resultfile = fopen(value, "w");
|
if (rank == 0){
|
||||||
if (out_resultfile == NULL){
|
out_resultfile = fopen(value, "w");
|
||||||
FAIL("Cannot open output file for writes!");
|
if (out_resultfile == NULL){
|
||||||
|
FAIL("Cannot open output file for writes!");
|
||||||
|
}
|
||||||
|
printf("Writing output to %s\n", value);
|
||||||
}
|
}
|
||||||
printf("Writing output to %s\n", value);
|
|
||||||
} else if (strcasecmp(option, "summaryFormat") == 0) {
|
} else if (strcasecmp(option, "summaryFormat") == 0) {
|
||||||
if(strcasecmp(value, "default")){
|
if(strcasecmp(value, "default") == 0){
|
||||||
outputFormat = OUTPUT_DEFAULT;
|
outputFormat = OUTPUT_DEFAULT;
|
||||||
}else if(strcasecmp(value, "JSON")){
|
}else if(strcasecmp(value, "JSON") == 0){
|
||||||
outputFormat = OUTPUT_JSON;
|
outputFormat = OUTPUT_JSON;
|
||||||
}else if(strcasecmp(value, "CSV")){
|
}else if(strcasecmp(value, "CSV") == 0){
|
||||||
outputFormat = OUTPUT_CSV;
|
outputFormat = OUTPUT_CSV;
|
||||||
}else{
|
}else{
|
||||||
FAIL("Unknown summaryFormat");
|
FAIL("Unknown summaryFormat");
|
||||||
|
|
|
@ -406,14 +406,28 @@ void ShowFileSystemSize(char *fileSystem)
|
||||||
if (realpath(fileSystem, realPath) == NULL) {
|
if (realpath(fileSystem, realPath) == NULL) {
|
||||||
ERR("unable to use realpath()");
|
ERR("unable to use realpath()");
|
||||||
}
|
}
|
||||||
fprintf(out_logfile, "Path: %s\n", realPath);
|
|
||||||
fprintf(out_logfile, "FS: %.1f %s Used FS: %2.1f%% ",
|
if(outputFormat == OUTPUT_DEFAULT){
|
||||||
totalFileSystemSizeHR, fileSystemUnitStr,
|
fprintf(out_resultfile, "Path: %s\n", realPath);
|
||||||
usedFileSystemPercentage);
|
fprintf(out_resultfile, "FS: %.1f %s Used FS: %2.1f%% ",
|
||||||
fprintf(out_logfile, "Inodes: %.1f Mi Used Inodes: %2.1f%%\n",
|
totalFileSystemSizeHR, fileSystemUnitStr,
|
||||||
(double)totalInodes / (double)(1<<20),
|
usedFileSystemPercentage);
|
||||||
usedInodePercentage);
|
fprintf(out_resultfile, "Inodes: %.1f Mi Used Inodes: %2.1f%%\n",
|
||||||
fflush(out_logfile);
|
(double)totalInodes / (double)(1<<20),
|
||||||
|
usedInodePercentage);
|
||||||
|
fflush(out_logfile);
|
||||||
|
}else if(outputFormat == OUTPUT_JSON){
|
||||||
|
fprintf(out_resultfile, " \"Path\": \"%s\",", realPath);
|
||||||
|
fprintf(out_resultfile, "\"Capacity\": \"%.1f %s\", \"Used Capacity\": \"%2.1f%%\",",
|
||||||
|
totalFileSystemSizeHR, fileSystemUnitStr,
|
||||||
|
usedFileSystemPercentage);
|
||||||
|
fprintf(out_resultfile, "\"Inodes\": \"%.1f Mi\", \"Used Inodes\" : \"%2.1f%%\",\n",
|
||||||
|
(double)totalInodes / (double)(1<<20),
|
||||||
|
usedInodePercentage);
|
||||||
|
}else if(outputFormat == OUTPUT_CSV){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* !_WIN32 */
|
#endif /* !_WIN32 */
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue