Thanks Chris,

The reason I need this is to set the hostname to the serial number of the processor.  Just to keep all of them unique...

cat /proc/cpuinfo | tail -n 1
and
cat /proc/cpuinfo | grep Serial

both give me:

Serial          : 328e1362e7af4134

I need it to output 328e1362e7af4134 for the hostname.  I'll then echo 328e1362e7af4134 > /etc/hostname && hostname /etc/hostname, or whatever.

Thanks,

Ryan

On 9/28/07, Chris Dollar <chris.dollar@gmail.com> wrote:
cat /proc/cpuinfo | tail -n 1

On 9/28/07, Ryan Pederson <ryan@pederson.ca> wrote:
> Hi all,
>
> Quick one for you guys...
>
> I need to pull the serial number of the CPU of the gumstix from
> /proc/cpuinfo.
>
> It's the very last line in the output:
>
> Processor       : XScale-PXA255 rev 6 (v5l)
> BogoMIPS        : 397.31
> Features        : swp half fastmult edsp
> CPU implementer : 0x69
> CPU architecture: 5TE
> CPU variant     : 0x0
> CPU part        : 0x2d0
> CPU revision    : 6
> Cache type      : undefined 5
> Cache clean     : undefined 5
> Cache lockdown  : undefined 5
> Cache format    : Harvard
> I size          : 32768
> I assoc         : 32
> I line length   : 32
> I sets          : 32
> D size          : 32768
> D assoc         : 32
> D line length   : 32
> D sets          : 32
>
> Hardware        : The Gumstix Platform
> Revision        : 0000
> Serial          : 328e1362e7af4134
>
>  I just need the serial number, not the preceding text or spaces.  Any ideas
> how this might be done?
>
> The closest I can get is to type "cat /proc/cpuinfo | grep Serial"
>
> Thanks!
>
> Ryan
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users