PMPRINTF - Online Linux Manual PageSection : 3
Updated : PCP
Source : Performance Co-Pilot

NAMEpmprintf, pmflush − print formatted output in a window or to standard error

C SYNOPSIS#include <pcp/pmapi.h> int pmprintf(const char *fmt, ... /*args*/);
int pmflush(void); cc ... −lpcp

DESCRIPTIONThe combination of pmprintf and pmflush produces output in either an xconfirm(1) window, on the standard error stream, or to a file in a manner similar to fprintf(3). The fmt argument is used to control the conversion, formatting, and printing of the variable length args list. The output technique is controlled via an environment variable. pmprintf appends the formatted message string to an internal buffer shared by the two routines, without actually producing any output. pmflush causes the internal buffer to be either displayed in a window, printed on standard error, or flushed to a file and the internal buffer to be cleared.

ENVIRONMENTThe environment variable PCP_STDERR controls the output technique used by pmflush: If PCP_STDERR is unset, the text is written onto the stderr stream of the caller. If PCP_STDERR is set to the literal reserved word DISPLAY then the text will be displayed as a GUI dialog using xconfirm(1). If PCP_STDERR is set to any other value then pmflush interprets the value as a file name and appends the text to that file. The file is created if it doesn't already exist, and in this case if the file creation fails, then stderr is used instead).

FILESpmprintf uses the mkstemp(3) function to create a temporary file. This temporary file is deleted when pmflush is called.

DIAGNOSTICSOn successful completion, pmprintf returns the number of characters transmitted, while pmflush returns a value of zero on successful completion. For either routine, a negative value is returned if an error was encountered, and this can be passed to pmErrStr(3) to obtain the associated error message.

SEE ALSOpmdbg(1), fprintf(3), mkstemp(3), pmErrStr(3) and PMAPI(3).
0
Johanes Gumabo
Data Size   :   7,243 byte
man-p___mflush.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 200,308
Visitor ID   :     :  
Visitor IP   :   3.133.145.168   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.