I'm writing a python library to take some CPU/process data and send it via syslog to splunk. The data is naturally tabular and contains quite a few rows. I will be polling this information frequently (every second or every 10 seconds). Is it best to send each process name with it's own CPU stats (% of total and total time) 2 values or instead send all of them in a single log message?
If I choose to send it all as one log message what is the best way to format it? I currently have it stored as nested python dictionary. Here are a couple of values:
{'Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00'}
the local_dict for process tSchedObjTimer looks like:
{'Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00'}
the local_dict for process tIkeMsgTask looks like:
I'm thinking something like:
process:tSchedObjTimer ['Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00'] process: tIkeMsgTask ['Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00']
or maybe
tSchedObjTimer=['Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00'] tIkeMsgTask=['Current CPU Percentage': '0.00', 'Total CPU Seconds': '0.00']
I was thinking about this last night. I'm going to have a lot of data and it would probably be best to aggregate the data and pack it.
tSchedObjTimer=['Current CPU Percentage': '0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00', 'Total CPU Seconds': '0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00' tIkeMsgTask=['Current CPU Percentage': '0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00', 'Total CPU Seconds': '0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
... View more