# How to differentiate between container restart and system boot.?

**URL:** <https://forums.balena.io/t/how-to-differentiate-between-container-restart-and-system-boot/5232>\
**Category:** balenaOS\
**Created:** [February 6, 2019, 3:16pm UTC](https://forums.balena.io/t/how-to-differentiate-between-container-restart-and-system-boot/5232 "2019-02-06T15:16:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [February 6, 2019, 3:16pm UTC](https://forums.balena.io/t/how-to-differentiate-between-container-restart-and-system-boot/5232/1 "2019-02-06T15:16:11Z")

</div>

Given a single container, possibly in a multicontainer device, how do I differentiate between a container restart and a device reboot?

---

<div class="post-metadata">

**Author:** ![dansku](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dansku/32/1183_2.png) [@dansku](https://forums.balena.io/u/dansku)\
**Post date:** [February 8, 2019, 10:51am UTC](https://forums.balena.io/t/how-to-differentiate-between-container-restart-and-system-boot/5232/2 "2019-02-08T10:51:01Z")

</div>

Hey @jason10,  
I wonder if this topic will help with your question: [Understanding container restarts](https://forums.balena.io/t/understanding-container-restarts/1782)

In another viewpoint, you can try differentiating the device & container times using `uptime`, which will show the system uptime. And if you do `balena ps` it will show the uptime for all containers.
