AnsweredAssumed Answered

pibufss -cfg does not run in c#

Question asked by rsun on May 16, 2016
Latest reply on May 18, 2016 by fdani

Hi when I run command pibufss -cfg in command prompt, I got output look like this


*** Configuration:
Buffering: On (API data buffered)
Loaded physical server global parameters: queuePath=D:\OSIsoft\Buffering authent
icationOptions=SSPI;TRUST

 

*** Buffer Sessions:
  1 non-HA server, name: ABC, session count: 1
    1 [yycrsun] state: SendingData, successful connections: 1
      PI identities: piadmins | PIWorld, auth type: SSPI
      firstcon: 16-May-16 08:55:53, lastreg: 16-May-16 08:55:53, regid: 4
      total events sent: 140, snapshot posts: 112, queued events: 0

 

I have the following code in C#, but the variable output is empty

 

 

 

Process p;

 

string output;

 

p = new Process();

 

p.StartInfo.UseShellExecute = false;

 

p.StartInfo.RedirectStandardOutput = true;

 

p.StartInfo.FileName = Environment.ExpandEnvironmentVariables("%pihome64%")+"bin\\pibufss.exe";

 

p.StartInfo.Arguments = "-cfg";

 

p.StartInfo.CreateNoWindow = true;

p.Start();

p.WaitForExit();

output = p.StandardOutput.ReadToEnd();

 

if I run other command like apisnap localhost cdt158, output variable has things inside.

Process p;

 

string output;

 

p = new Process();

 

p.StartInfo.UseShellExecute = false;

 

p.StartInfo.RedirectStandardOutput = true;

 

p.StartInfo.FileName = Environment.ExpandEnvironmentVariables("%pihome64%")+"bin\\apisnap.exe";

 

p.StartInfo.Arguments = "locahost cdt158";

 

p.StartInfo.CreateNoWindow = true;

p.Start();

p.WaitForExit();

output = p.StandardOutput.ReadToEnd();

 

I was wondering how I could get pibufss to work with c#. why pibufss.exe different from other command?

 

 

 

Outcomes