#include <time.h> #ifndef NONAMESPACE #include <iostream> #include <fstream> using namespace std; #else #include <iostream.h> #include <fstream.h> #endif #include <string> #include "extremes.h" #include "funcnames.h" #include "pidhash.h" #include "log.h" #include "args.h" #include "usage.h" #include "outputtype.h" int main( int argc, char **argv ); int main( int argc, char **argv ) { bool usage; int outputtype; string filename; time_t begints; time_t endts; int rc; Log log; if( rc = ParseArgs( argc, argv, &usage, &outputtype, &begints, &endts, &filename ) ) return rc; if( usage ) { PrintUsage(); } else { if( rc = PrintArgs( outputtype, begints, endts, filename ) ) return rc; if( rc = log.SetFilename( filename ) ) return rc; if( !( rc = log.Open() ) ) { if( outputtype == OUTPUT_DETAIL ) cout << "\n"; if( rc = log.Process( outputtype, begints, endts ) ) return rc; if( rc = log.Close() ) return rc; } else { cout << "Couldn't open p4d server log!\n"; cout << "Perhaps p4loga --help for more information?\n"; return rc; } } return 0; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 5390 | Shawn Hladky |
modified p4loga: added --csv switch to output a coma-separated variable file identifying every command function recorded. No header or summary info is displayed. This file can be loaded in a spreadsheet application or imported into a database for further analysis. added support to identify the ClientProgram name from the log file. At this point, only server logs for a 2005.1 server have been (minimally) tested. |
||
#1 | 5389 | Shawn Hladky | Branching p4loga for modifications | ||
//guest/michael_shields/src/p4loga/p4loga.cc | |||||
#4 | 4955 | Michael Shields | Abstract out Log class. | ||
#3 | 4630 | Michael Shields |
Throw away garbage in the log resulting from p4d bug 15356. Such garbage will no longer prematurely terminate p4loga. |
||
#2 | 1722 | Michael Shields |
p4loga builds for freebsd4 (play), hpux11 (hell), linux24x86 (duey), and solaris26 (shucks). A bit of porting was required for the hpux11 build (aCC as configured on hell isn't quite up to speed with respect to namespaces). |
||
#1 | 1610 | Michael Shields |
Adding p4d log analyzer concocted by myself. Compiles and executes on Red Hat 6.0, 7.0, and probably a few other operating systems with perhaps a little help. Still needs comments. |