Re: [dev] golang dwm status

From: Alexander Huemer <alexander.huemer_AT_xx.vu>
Date: Thu, 13 Mar 2014 20:57:28 +0100

On Thu, Mar 13, 2014 at 08:50:38PM +0100, Markus Teich wrote:
> Alexander Huemer wrote:
> > I don't have much clue about go, but I think that the content of /proc/cpuinfo
> > differ greatly on different architecture. Maybe the output ls `lscpu` is
> > better suited for that purpose.
>
> Thanks for the hint. However I wanted to avoid spawning other processes as much
> as possible. Is there another way to count the cpu cores just by reading a file
> in /proc or maybe /sys?

Not that I know of. As it seems the linux kernel does not provide those
pieces of information in an architecture independent format. I vaguely
remember a thread somewhere that discussed this issue, but I have no
idea where that was. In the current situation lscpu is the best you'll
get.
Do you care about other operating systems then linux? E.g. the MacOS™s do
not have /proc/cpuinfo at all.

Kind regards,
-Alex
Received on Thu Mar 13 2014 - 20:57:28 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 13 2014 - 21:00:13 CET