Skip to content

Timestamp in storage option stdout #2360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
parthyadav3105 opened this issue Dec 18, 2019 · 2 comments · Fixed by #2361
Closed

Timestamp in storage option stdout #2360

parthyadav3105 opened this issue Dec 18, 2019 · 2 comments · Fixed by #2361

Comments

@parthyadav3105
Copy link
Contributor

Hi,
I am running cAdvisor with storage option stdout using command sudo ./cadvisor -storage_driver=stdout --housekeeping_interval=0.5s --storage_driver_buffer_duration=1s >/tmp/cadvisor.log

Which gives output in format:

...
...
cName=/system.slice/colord.service host=localhost:8086 memory_working_set=8470528 rx_bytes=0 rx_errors=0 tx_bytes=0 tx_errors=0 cpu_cumulative_usage=384268545 memory_usage=21446656
cName=/system.slice/rtkit-daemon.service host=localhost:8086 cpu_cumulative_usage=270384938 memory_usage=1200128 memory_working_set=1200128 rx_bytes=0 rx_errors=0 tx_bytes=0 tx_errors=0
cName=/system.slice/upower.service host=localhost:8086 tx_errors=0 cpu_cumulative_usage=401365373 memory_usage=3158016 memory_working_set=2617344 rx_bytes=0 rx_errors=0 tx_bytes=0
cName=/system.slice/whoopsie.service host=localhost:8086 cpu_cumulative_usage=83462883 memory_usage=3551232 memory_working_set=3416064 rx_bytes=0 rx_errors=0 tx_bytes=0 tx_errors=0
cName=/system.slice/irqbalance.service host=localhost:8086 tx_errors=0 cpu_cumulative_usage=952756765 memory_usage=1105920 memory_working_set=1105920 rx_bytes=0 rx_errors=0 tx_bytes=0
cName=/system.slice/system-systemd\x2dfsck.slice host=localhost:8086 tx_errors=0 cpu_cumulative_usage=16404287 memory_usage=299008 memory_working_set=28672 rx_bytes=0 rx_errors=0 tx_bytes=0
cName=/system.slice host=localhost:8086 rx_bytes=0 rx_errors=0 tx_bytes=0 tx_errors=0 cpu_cumulative_usage=1036001300049 memory_usage=1149906944 memory_working_set=681279488
cName=/system.slice/snapd.service host=localhost:8086 rx_errors=0 tx_bytes=0 tx_errors=0 cpu_cumulative_usage=63396451534 memory_usage=74321920 memory_working_set=32960512 rx_bytes=0
cName=/system.slice/kerneloops.service host=localhost:8086 tx_errors=0 cpu_cumulative_usage=1230652177 memory_usage=1744896 memory_working_set=1744896 rx_bytes=0 rx_errors=0 tx_bytes=0
...
...
...

But the above metrics don't have a timestamp at which they were recorded.

Is there any way to enable this?

@dashpole
Copy link
Collaborator

I don't think that has been added to the stdout storage driver. You are welcome do do that if you are interested. https://github.com/google/cadvisor/blob/master/storage/stdout/stdout.go

@parthyadav3105
Copy link
Contributor Author

parthyadav3105 commented Dec 19, 2019

Thanks, I will add that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants