summaryrefslogtreecommitdiff
path: root/src/coordinator.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-09-17 17:53:13 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-09-17 17:53:13 +0200
commitf8a83ea88eacf744f9bde5e3f96e29ad627ec2f5 (patch)
treee97206ee03ff9c78f81ba635a2ec9701c55b7241 /src/coordinator.c
parent5979f05b51f6f6c9d1f582d405cc6ac787651f3e (diff)
downloadbiruda-f8a83ea88eacf744f9bde5e3f96e29ad627ec2f5.tar.gz
biruda-f8a83ea88eacf744f9bde5e3f96e29ad627ec2f5.tar.bz2
started to add simple CPE os detection
Diffstat (limited to 'src/coordinator.c')
-rw-r--r--src/coordinator.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/coordinator.c b/src/coordinator.c
index 57642be..646d220 100644
--- a/src/coordinator.c
+++ b/src/coordinator.c
@@ -57,9 +57,13 @@ static void *coordinator_func( void *thread_data )
gethostname( hostname, 100 );
json_object *host = json_object_new_string( hostname );
json_object_object_add( obj, "host", host );
- unsigned int nofCpus = available_cpus( );
+ unsigned int nofCpus = system_available_cpus( );
json_object *cpus = json_object_new_int( nofCpus );
json_object_object_add( obj, "cpus", cpus );
+ char cpe_name[100];
+ system_cpe_name( cpe_name, 100 );
+ json_object *os = json_object_new_string( cpe_name );
+ json_object_object_add( obj, "os", os );
const char *msg = json_object_to_json_string( obj );
int msg_size = strlen( msg ) + 1;
printf( "coordinator send: %s\n", msg );