Re: Get OS uptime
Posted by
Julien Delplanque on
Mar 19, 2015; 10:25am
URL: https://forum.world.st/Get-OS-uptime-tp4813047p4813126.html
On 19/03/15 11:10, Esteban Lorenzano wrote:
> '/proc/uptime' asFileReference readStreamDo: [ :stream | stream contents ].
>
> is better way.
>
> but you will still get an empty string because actually ‘/proc’ does not contains real files… so the file plugin does not applies there (and is another debate if it should…)
>
> you should use OSProcess instead (installable from Configurations Browser)
>
> (PipeableOSProcess command: 'uptime') upToEndOfFile.
>
> Esteban
Oh, I didn't know '/proc' doesn't contains real files. I tought there
were files in this directory since you do 'cat /proc/uptime' in a shell.