{"action":"created","issue":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/347","labels_url":"https://api.github.com/repos/avocado-framework/avocado/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/issues/347/comments","events_url":"https://api.github.com/repos/avocado-framework/avocado/issues/347/events","html_url":"https://github.com/avocado-framework/avocado/pull/347","id":55211999,"number":347,"title":"WIP: avocado.sysinfo: Introduce daemon logging (journalctl & vmstat).","user":{"login":"ruda","id":171907,"avatar_url":"https://avatars.githubusercontent.com/u/171907?v=3","gravatar_id":"","url":"https://api.github.com/users/ruda","html_url":"https://github.com/ruda","followers_url":"https://api.github.com/users/ruda/followers","following_url":"https://api.github.com/users/ruda/following{/other_user}","gists_url":"https://api.github.com/users/ruda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruda/subscriptions","organizations_url":"https://api.github.com/users/ruda/orgs","repos_url":"https://api.github.com/users/ruda/repos","events_url":"https://api.github.com/users/ruda/events{/privacy}","received_events_url":"https://api.github.com/users/ruda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-22T21:33:42Z","updated_at":"2015-01-23T20:14:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/347","html_url":"https://github.com/avocado-framework/avocado/pull/347","diff_url":"https://github.com/avocado-framework/avocado/pull/347.diff","patch_url":"https://github.com/avocado-framework/avocado/pull/347.patch"},"body":"Sysinfo now allows to use commands to be executed as daemons,\r\nby including the proper command line inside _DEFAULT_DAEMON_START_JOB.\r\n\r\nThe daemons are started before the job begins and then, stopped at\r\nthe end of the job. The output are stored inside \"sysinfo/pre\"\r\nsubdirectory, in job result directory.\r\n\r\nBy default, the commands  \"journalctl -f\" and \"vmstat 1\" are\r\nstarted in every job execution and stopped at the end.\r\n\r\nSome changes regarding this new feature:\r\n\r\n* Add new class Daemon() with method stop() defined to terminate\r\n  the daemon process.\r\n* Register _DEFAULT_DAEMON_START_JOB as start_job_loggables.\r\n* Make use of DEFAULT_COMMANDS_END_JOB with default to\r\n  DEFAULT_COMMANDS_START_JOB (to respect the previous behavior).\r\n* Make use of _DEFAULT_FILES_END_JOB with default to\r\n  DEFAULT_FILES_START_JOB (to respect the previous behavior).\r\n* Commands/Daemons: Redirect stderr output to stdout, in order to catch\r\n  commands not installed or malformed command line options in logs.\r\n\r\nSigned-off-by: Rudá Moura <rmoura@redhat.com>"},"comment":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/comments/71257926","html_url":"https://github.com/avocado-framework/avocado/pull/347#issuecomment-71257926","issue_url":"https://api.github.com/repos/avocado-framework/avocado/issues/347","id":71257926,"user":{"login":"ruda","id":171907,"avatar_url":"https://avatars.githubusercontent.com/u/171907?v=3","gravatar_id":"","url":"https://api.github.com/users/ruda","html_url":"https://github.com/ruda","followers_url":"https://api.github.com/users/ruda/followers","following_url":"https://api.github.com/users/ruda/following{/other_user}","gists_url":"https://api.github.com/users/ruda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruda/subscriptions","organizations_url":"https://api.github.com/users/ruda/orgs","repos_url":"https://api.github.com/users/ruda/repos","events_url":"https://api.github.com/users/ruda/events{/privacy}","received_events_url":"https://api.github.com/users/ruda/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T20:14:04Z","updated_at":"2015-01-23T20:14:04Z","body":"I'm going to use `profile` and provide an option to enable/disable the daemons (as @clebergnu  suggested) in the configuration. Thanks for the good points on this PR."}}