2 This file is part of GNUnet.
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file sensor/gnunet-sensor-profiler.c
23 * @brief Profiler for the sensor service
24 * @author Omar Tarabai
27 #include "gnunet_util_lib.h"
28 #include "gnunet_testbed_service.h"
29 #include "gnunet_peerstore_service.h"
30 #include "gnunet_sensor_service.h"
31 #include "gnunet_sensor_util_lib.h"
32 #include "gnunet_transport_service.h"
35 * Time to wait for the peer to startup completely
37 #define PEER_STARTUP_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
40 * Information about a single peer
48 struct GNUNET_PeerIdentity peer_id;
53 struct GNUNET_TESTBED_Peer *testbed_peer;
57 struct DisconnectionContext
60 struct DisconnectionContext *prev;
62 struct DisconnectionContext *next;
68 struct GNUNET_TESTBED_Operation *p1_transport_op;
70 struct GNUNET_TRANSPORT_Blacklist *blacklist;
76 * Name of the configuration file used
78 static const char *cfg_filename = "gnunet-sensor-profiler.conf";
81 * Directory to read sensor definitions from
83 static const char *sensor_src_dir = "sensors";
86 * Directory to write new sensor definitions to
88 static const char *sensor_dst_dir = "/tmp/gnunet-sensor-profiler";
91 * GNUnet configuration
93 static struct GNUNET_CONFIGURATION_Handle *cfg;
96 * Return value of the program
101 * Number of peers to run (Option -p)
103 static unsigned int num_peers = 0;
106 * Set sensors running interval to this value (Option -i)
108 static unsigned int sensors_interval = 0;
111 * Path to topology file (Option -t)
113 static char *topology_file;
116 * Array of peer info for all peers
118 static struct PeerInfo *all_peers_info;
121 * Number of peers that we already collected and start their info
123 static int peers_known = 0;
126 * TESTBED operation connecting us to peerstore service on collection point
128 static struct GNUNET_TESTBED_Operation *peerstore_op;
131 * Handle to peerstore service on collection point
133 static struct GNUNET_PEERSTORE_Handle *peerstore;
136 * Dashboard service on collection point started?
138 static int dashboard_service_started = GNUNET_NO;
141 * Number of peers started the sensor service successfully
143 static int sensor_services_started = 0;
146 * Array of sensor names to be used for watching peerstore records
148 static char **sensor_names;
151 * Size of 'sensor_names' array
153 static unsigned int sensor_names_size = 0;
156 * Task run after any waiting period
158 static GNUNET_SCHEDULER_TaskIdentifier delayed_task = GNUNET_SCHEDULER_NO_TASK;
161 * Head of list of disconnection contexts
163 static struct DisconnectionContext *dc_head;
166 * Tail of list of disconnection contexts
168 static struct DisconnectionContext *dc_tail;
172 * Copy directory recursively
174 * @param src Path to source directory
175 * @param dst Destination directory, will be created if it does not exist
176 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
179 copy_dir (const char *src, const char *dst);
183 * Do clean up and shutdown scheduler
186 do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
189 struct DisconnectionContext *dc;
191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down.\n");
192 if (GNUNET_SCHEDULER_NO_TASK != delayed_task)
194 GNUNET_SCHEDULER_cancel (delayed_task);
195 delayed_task = GNUNET_SCHEDULER_NO_TASK;
200 GNUNET_CONTAINER_DLL_remove (dc_head, dc_tail, dc);
201 if (NULL != dc->blacklist)
203 GNUNET_TRANSPORT_blacklist_cancel (dc->blacklist);
204 dc->blacklist = NULL;
206 if (NULL != dc->p1_transport_op)
208 GNUNET_TESTBED_operation_done (dc->p1_transport_op);
209 dc->p1_transport_op = NULL;
214 if (NULL != peerstore_op)
216 GNUNET_TESTBED_operation_done (peerstore_op);
219 if (NULL != all_peers_info)
221 GNUNET_free (all_peers_info);
222 all_peers_info = NULL;
226 GNUNET_CONFIGURATION_destroy (cfg);
229 if (NULL != sensor_names)
231 for (i = 0; i < sensor_names_size; i++)
232 GNUNET_free (sensor_names[i]);
233 GNUNET_array_grow (sensor_names, sensor_names_size, 0);
235 GNUNET_SCHEDULER_shutdown ();
239 /*****************************************************************************/
240 /****************************** DISCONNECT PEERS *****************************/
241 /*****************************************************************************/
245 * Function to call with result of the TRANSPORT try disconnect request.
248 * @param result #GNUNET_OK if message was transmitted to transport service
249 * #GNUNET_SYSERR if message was not transmitted to transport service
252 transport_disconnect_cb (void *cls, const int result)
254 struct DisconnectionContext *dc = cls;
256 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnection request between `%s' and `%s' sent.\n",
257 GNUNET_i2s (&dc->p1->peer_id), GNUNET_i2s (&dc->p2->peer_id));
262 * Callback to be called when transport service connect operation is completed
264 * @param cls the callback closure from functions generating an operation
265 * @param op the operation that has been finished
266 * @param ca_result the service handle returned from GNUNET_TESTBED_ConnectAdapter()
267 * @param emsg error message in case the operation has failed; will be NULL if
268 * operation has executed successfully.
271 transport_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op,
272 void *ca_result, const char *emsg)
274 struct DisconnectionContext *dc = cls;
275 struct GNUNET_TRANSPORT_Handle *transport = ca_result;
279 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
282 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %d: %s\n", 0, GNUNET_i2s (&dc->p1->peer_id));
283 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %d: %s\n", 1, GNUNET_i2s (&dc->p2->peer_id));
284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "transport_connect_cb().\n");
285 GNUNET_TRANSPORT_try_disconnect (transport, &dc->p2->peer_id, &transport_disconnect_cb, dc);
290 * Callback from TRANSPORT service to ask if the given peer ID is blacklisted.
292 * @param cls closure, DisconnectionContext
293 * @param pid peer to approve or disapproave
294 * @return #GNUNET_OK if the connection is allowed, #GNUNET_SYSERR if not
297 blacklist_cb (void *cls, const struct GNUNET_PeerIdentity *pid)
299 struct DisconnectionContext *dc = cls;
301 if (0 == GNUNET_CRYPTO_cmp_peer_identity (&dc->p2->peer_id, pid))
302 return GNUNET_SYSERR;
308 * Adapter function called to establish a connection to transport service.
311 * @param cfg configuration of the peer to connect to; will be available until
312 * GNUNET_TESTBED_operation_done() is called on the operation returned
313 * from GNUNET_TESTBED_service_connect()
314 * @return service handle to return in 'op_result', NULL on error
317 transport_connect_adapter (void *cls,
318 const struct GNUNET_CONFIGURATION_Handle *cfg)
320 struct DisconnectionContext *dc = cls;
321 struct GNUNET_TRANSPORT_Handle *transport;
323 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "transport_connect_adapter().\n");
324 dc-> blacklist = GNUNET_TRANSPORT_blacklist (cfg, &blacklist_cb, dc);
325 GNUNET_assert (NULL != dc->blacklist);
326 transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
327 GNUNET_assert (NULL != transport);
333 * Adapter function called to destroy a connection to transport service.
336 * @param op_result service handle returned from the connect adapter
339 transport_disconnect_adapter (void *cls, void *op_result)
341 struct GNUNET_TRANSPORT_Handle *transport = op_result;
343 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "transport_disconnect_adapter().\n");
344 GNUNET_TRANSPORT_disconnect(transport);
349 * Kill any connection between two peers. Has no effect if the peers are not
353 disconnect_peers (struct PeerInfo *p1, struct PeerInfo *p2)
355 struct DisconnectionContext *dc;
357 GNUNET_assert (p1 != p2);
358 dc = GNUNET_new (struct DisconnectionContext);
361 GNUNET_CONTAINER_DLL_insert (dc_head, dc_tail, dc);
362 dc->p1_transport_op =
363 GNUNET_TESTBED_service_connect (NULL, p1->testbed_peer,
364 "transport", &transport_connect_cb,
365 dc, &transport_connect_adapter,
366 &transport_disconnect_adapter, dc);
370 /*****************************************************************************/
371 /**************************** END DISCONNECT PEERS ***************************/
372 /*****************************************************************************/
376 * Function called with each file/folder inside a directory that is being copied.
378 * @param cls closure, destination directory
379 * @param filename complete filename (absolute path)
380 * @return #GNUNET_OK to continue to iterate.
381 * #GNUNET_SYSERR to abort iteration with error
384 copy_dir_scanner (void *cls, const char *filename)
390 GNUNET_asprintf (&dst, "%s%s%s", dst_dir, DIR_SEPARATOR_STR,
391 GNUNET_STRINGS_get_short_name (filename));
392 if (GNUNET_YES == GNUNET_DISK_directory_test (filename, GNUNET_YES))
393 copy_result = copy_dir (filename, dst);
396 if (GNUNET_YES == GNUNET_DISK_file_test (dst))
397 GNUNET_DISK_directory_remove (dst);
398 copy_result = GNUNET_DISK_file_copy (filename, dst);
399 if (GNUNET_OK == copy_result)
400 GNUNET_DISK_fix_permissions (dst, GNUNET_NO, GNUNET_NO);
408 * Copy directory recursively
410 * @param src Path to source directory
411 * @param dst Destination directory, will be created if it does not exist
412 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
415 copy_dir (const char *src, const char *dst)
417 if (GNUNET_YES != GNUNET_DISK_directory_test (src, GNUNET_YES))
418 return GNUNET_SYSERR;
419 if (GNUNET_OK != GNUNET_DISK_directory_create (dst))
420 return GNUNET_SYSERR;
422 GNUNET_DISK_directory_scan (src, ©_dir_scanner, (char *) dst))
423 return GNUNET_SYSERR;
429 * Function called with each file/folder inside source sensor directory.
431 * @param cls closure (unused)
432 * @param filename complete filename (absolute path)
433 * @return #GNUNET_OK to continue to iterate.
436 sensor_dir_scanner (void *cls, const char *filename)
438 const char *file_basename;
440 struct GNUNET_CONFIGURATION_Handle *sensor_cfg;
443 file_basename = GNUNET_STRINGS_get_short_name (filename);
444 GNUNET_asprintf (&dst_path, "%s%s%s", sensor_dst_dir, DIR_SEPARATOR_STR,
446 if (GNUNET_YES == GNUNET_DISK_directory_test (filename, GNUNET_NO))
448 GNUNET_assert (GNUNET_OK == copy_dir (filename, dst_path));
452 sensor_name = GNUNET_strdup (file_basename);
453 GNUNET_array_append (sensor_names, sensor_names_size, sensor_name);
454 sensor_cfg = GNUNET_CONFIGURATION_create ();
455 GNUNET_assert (GNUNET_OK ==
456 GNUNET_CONFIGURATION_parse (sensor_cfg, filename));
457 GNUNET_CONFIGURATION_set_value_string (sensor_cfg, file_basename,
459 GNUNET_i2s_full (&all_peers_info
461 if (sensors_interval > 0)
463 GNUNET_CONFIGURATION_set_value_number (sensor_cfg, file_basename,
465 (unsigned long long int)
468 GNUNET_CONFIGURATION_write (sensor_cfg, dst_path);
469 GNUNET_CONFIGURATION_destroy (sensor_cfg);
471 GNUNET_free (dst_path);
477 * Load sensor definitions and rewrite them to tmp location.
478 * Add collection point peer id and change running interval if needed.
483 GNUNET_assert (GNUNET_YES ==
484 GNUNET_DISK_directory_test (sensor_src_dir, GNUNET_YES));
485 GNUNET_assert (GNUNET_OK == GNUNET_DISK_directory_create (sensor_dst_dir));
486 GNUNET_DISK_directory_scan (sensor_src_dir, &sensor_dir_scanner, NULL);
491 * Callback to be called when dashboard service is started
493 * @param cls the callback closure from functions generating an operation
494 * @param op the operation that has been finished
495 * @param emsg error message in case the operation has failed; will be NULL if
496 * operation has executed successfully.
499 dashboard_started (void *cls, struct GNUNET_TESTBED_Operation *op,
504 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
507 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Dashboard service started.\n");
508 GNUNET_TESTBED_operation_done (op);
509 dashboard_service_started = GNUNET_YES;
514 * Function called by PEERSTORE for each matching record.
517 * @param record peerstore record information
518 * @param emsg error message, or NULL if no errors
519 * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop
522 peerstore_watch_cb (void *cls, struct GNUNET_PEERSTORE_Record *record,
525 struct PeerInfo *peer = cls;
526 struct GNUNET_SENSOR_DashboardAnomalyEntry *anomaly;
530 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
533 GNUNET_assert (record->value_size ==
534 sizeof (struct GNUNET_SENSOR_DashboardAnomalyEntry));
535 anomaly = record->value;
537 GNUNET_CRYPTO_cmp_peer_identity (&peer->peer_id,
539 printf ("Anomaly report:\n" " Peer: `%s'\n" " Sensor: `%s'\n"
540 " Anomalous: `%d'\n" " Anomalous neighbors: %f.\n\n",
541 GNUNET_i2s (&peer->peer_id), record->key, anomaly->anomalous,
542 anomaly->anomalous_neighbors);
548 * Callback to be called when peerstore service connect operation is completed
550 * @param cls the callback closure from functions generating an operation
551 * @param op the operation that has been finished
552 * @param ca_result the service handle returned from GNUNET_TESTBED_ConnectAdapter()
553 * @param emsg error message in case the operation has failed; will be NULL if
554 * operation has executed successfully.
557 peerstore_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op,
558 void *ca_result, const char *emsg)
562 struct PeerInfo *peer;
566 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
569 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peerstore service.\n");
570 /* Watch for anomaly reports from other peers */
571 for (i = 0; i < num_peers; i++)
573 peer = &all_peers_info[i];
574 for (j = 0; j < sensor_names_size; j++)
576 GNUNET_PEERSTORE_watch (peerstore, "sensordashboard-anomalies",
577 &peer->peer_id, sensor_names[j],
578 &peerstore_watch_cb, peer);
585 * Adapter function called to establish a connection to peerstore service.
588 * @param cfg configuration of the peer to connect to; will be available until
589 * GNUNET_TESTBED_operation_done() is called on the operation returned
590 * from GNUNET_TESTBED_service_connect()
591 * @return service handle to return in 'op_result', NULL on error
594 peerstore_connect_adapter (void *cls,
595 const struct GNUNET_CONFIGURATION_Handle *cfg)
597 peerstore = GNUNET_PEERSTORE_connect (cfg);
598 GNUNET_assert (NULL != peerstore);
604 * Adapter function called to destroy a connection to peerstore service.
607 * @param op_result service handle returned from the connect adapter
610 peerstore_disconnect_adapter (void *cls, void *op_result)
612 GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_NO);
619 * This function is called after the estimated training period is over.
622 simulate_anomalies (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
624 delayed_task = GNUNET_SCHEDULER_NO_TASK;
625 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
626 "Training period over, simulating anomalies now.\n");
632 * This function is called after a delay which ensures that all peers are
633 * properly initialized
636 peers_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
638 unsigned long long int training_points;
639 struct GNUNET_TIME_Relative training_period;
641 delayed_task = GNUNET_SCHEDULER_NO_TASK;
642 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers are ready.\n");
643 GNUNET_assert (GNUNET_OK ==
644 GNUNET_CONFIGURATION_get_value_number (cfg,
645 "sensor-model-gaussian",
649 GNUNET_TIME_relative_multiply (GNUNET_TIME_relative_multiply
650 (GNUNET_TIME_UNIT_SECONDS,
652 0) ? 60 : sensors_interval),
654 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
655 "Sleeping for a training period of %s.\n",
656 GNUNET_STRINGS_relative_time_to_string (training_period,
659 GNUNET_SCHEDULER_add_delayed (training_period, &simulate_anomalies, NULL);
664 * Callback to be called when sensor service is started
666 * @param cls the callback closure from functions generating an operation
667 * @param op the operation that has been finished
668 * @param emsg error message in case the operation has failed; will be NULL if
669 * operation has executed successfully.
672 sensor_service_started (void *cls, struct GNUNET_TESTBED_Operation *op,
675 struct PeerInfo *peer = cls;
679 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
682 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sensor service started on peer `%s'.\n",
683 GNUNET_i2s (&peer->peer_id));
684 GNUNET_TESTBED_operation_done (op);
685 sensor_services_started++;
686 if (sensor_services_started == num_peers)
689 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
690 (PEER_STARTUP_TIME, num_peers),
697 * Callback to be called when the requested peer information is available
699 * @param cb_cls the closure from GNUNET_TETSBED_peer_get_information()
700 * @param op the operation this callback corresponds to
701 * @param pinfo the result; will be NULL if the operation has failed
702 * @param emsg error message if the operation has failed; will be NULL if the
703 * operation is successfull
706 peer_info_cb (void *cb_cls, struct GNUNET_TESTBED_Operation *op,
707 const struct GNUNET_TESTBED_PeerInformation *pinfo,
710 struct GNUNET_TESTBED_Peer *testbed_peer = cb_cls;
711 struct PeerInfo *peer = &all_peers_info[peers_known];
715 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
718 peer->testbed_peer = testbed_peer;
719 GNUNET_CRYPTO_get_peer_identity (pinfo->result.cfg, &peer->peer_id);
721 if (1 == peers_known) /* First peer is collection point */
723 /* Rewrite sensors */
725 /* Start dashboard */
726 GNUNET_TESTBED_peer_manage_service (NULL, testbed_peer, "sensordashboard",
727 &dashboard_started, NULL, 1);
729 /* Start sensor service on every peer */
730 GNUNET_TESTBED_peer_manage_service (NULL, testbed_peer, "sensor",
731 &sensor_service_started, peer, 1);
732 if (num_peers == peers_known) /* Last peer */
734 /* Connect to peerstore on first peer (collection point) */
736 GNUNET_TESTBED_service_connect (NULL, all_peers_info[0].testbed_peer,
737 "peerstore", &peerstore_connect_cb,
738 NULL, &peerstore_connect_adapter,
739 &peerstore_disconnect_adapter, NULL);
741 GNUNET_TESTBED_operation_done (op);
746 * Signature of a main function for a testcase.
749 * @param h the run handle
750 * @param num number of peers in 'peers'
751 * @param peers handle to peers run in the testbed. NULL upon timeout (see
752 * GNUNET_TESTBED_test_run()).
753 * @param links_succeeded the number of overlay link connection attempts that
755 * @param links_failed the number of overlay link connection attempts that
757 * @see GNUNET_TESTBED_test_run()
760 test_master (void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num,
761 struct GNUNET_TESTBED_Peer **peers, unsigned int links_succeeded,
762 unsigned int links_failed)
766 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
767 "%d peers started. %d links succeeded. %d links failed.\n",
768 num_peers, links_succeeded, links_failed);
769 GNUNET_assert (num == num_peers);
770 GNUNET_assert (0 == links_failed);
771 /* Collect peer information */
772 all_peers_info = GNUNET_new_array (num_peers, struct PeerInfo);
774 for (i = 0; i < num_peers; i++)
776 GNUNET_TESTBED_peer_get_information (peers[i],
777 GNUNET_TESTBED_PIT_CONFIGURATION,
778 &peer_info_cb, peers[i]);
784 * Verify that the user passed correct CL args
786 * @return #GNUNET_OK if arguments are valid, #GNUNET_SYSERR otherwise
793 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
795 ("Invalid or missing number of peers. Set at least 2 peers.\n"));
796 return GNUNET_SYSERR;
798 if (NULL == topology_file ||
799 GNUNET_YES != GNUNET_DISK_file_test (topology_file))
801 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
802 _("Missing or invalid topology file.\n"));
803 return GNUNET_SYSERR;
810 * Actual main function.
813 * @param args remaining args, unused
814 * @param cfgfile name of the configuration
815 * @param cfg configuration handle
818 run (void *cls, char *const *args, const char *cf,
819 const struct GNUNET_CONFIGURATION_Handle *c)
821 if (GNUNET_OK != verify_args ())
823 do_shutdown (NULL, NULL);
826 cfg = GNUNET_CONFIGURATION_create ();
827 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (cfg, cfg_filename));
828 GNUNET_CONFIGURATION_set_value_string ((struct GNUNET_CONFIGURATION_Handle *)
830 "OVERLAY_TOPOLOGY_FILE",
832 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_shutdown,
834 GNUNET_TESTBED_run (NULL, cfg, num_peers, 0, NULL, NULL, &test_master, NULL);
841 * @return 0 on success
844 main (int argc, char *const *argv)
846 static struct GNUNET_GETOPT_CommandLineOption options[] = {
847 {'p', "peers", "COUNT", gettext_noop ("Number of peers to run"), GNUNET_YES,
848 &GNUNET_GETOPT_set_uint, &num_peers},
849 {'t', "topology-file", "FILEPATH", gettext_noop ("Path to topology file"),
850 GNUNET_YES, &GNUNET_GETOPT_set_filename, &topology_file},
851 {'i', "sensors-interval", "INTERVAL",
852 gettext_noop ("Change the interval or running sensors to given value"),
853 GNUNET_YES, &GNUNET_GETOPT_set_uint, &sensors_interval},
854 GNUNET_GETOPT_OPTION_END
858 GNUNET_PROGRAM_run (argc, argv, "gnunet-sensor-profiler",
859 gettext_noop ("Profiler for sensor service"),
860 options, &run, NULL)) ? ok : 1;
863 /* end of gnunet-sensor-profiler.c */