[v2,4/7] fff-nodewatcher: add platform as chipset

Submitted by Tim Niemeyer on June 11, 2016, 3:20 p.m.

Details

Message ID 1465658452-20513-5-git-send-email-tim@tn-x.org
State Accepted, archived
Commit 434dff19291d13827f8f9b300169f61b0d115615
Headers show

Commit Message

Tim Niemeyer June 11, 2016, 3:20 p.m.
On some devices cpuinfo returns no "system type". For that devices the
"platform" tag contains the relevant chipset information.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
---

Changes in v2:
- Rebased with spaces

 src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
index 6c75338..b343b84 100755
--- a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
+++ b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
@@ -84,6 +84,7 @@  crawl() {
     cpu=$(awk -F': ' '
         /model/ { printf "<cpu>"$2"</cpu>" }
         /system type/ { printf "<chipset>"$2"</chipset>" }
+        /platform/ { printf "<chipset>"$2"</chipset>" }
     ' /proc/cpuinfo)
     model="<model>$(cat /var/sysinfo/model)</model>"
     local_time="`date +%s`"

Comments

Jan Kraus June 11, 2016, 9:22 p.m.
Hi Tim,

das Review von Tobias war da sogar schon dran.
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>

Grüße Jan
Am Samstag, den 11.06.2016, 17:20 +0200 schrieb Tim Niemeyer:
> On some devices cpuinfo returns no "system type". For that devices the
> "platform" tag contains the relevant chipset information.
> 
> Signed-off-by: Tim Niemeyer <tim@tn-x.org>
> ---
> 
> Changes in v2:
> - Rebased with spaces
> 
>  src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> index 6c75338..b343b84 100755
> --- a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> +++ b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> @@ -84,6 +84,7 @@ crawl() {
>      cpu=$(awk -F': ' '
>          /model/ { printf "<cpu>"$2"</cpu>" }
>          /system type/ { printf "<chipset>"$2"</chipset>" }
> +        /platform/ { printf "<chipset>"$2"</chipset>" }
>      ' /proc/cpuinfo)
>      model="<model>$(cat /var/sysinfo/model)</model>"
>      local_time="`date +%s`"
> -- 
> 2.1.4
>