We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

how to use journalctl with sfos? [answered]

asked 2017-05-05 11:43:57 +0200

cemoi71 gravatar image

updated 2017-05-05 18:37:58 +0200

coderus gravatar image

Hello sailors,

i want to analyse actions of a specific process, and thought that i could maybe make it with the journalctl command.
Firstly, I wanted to represent myself what could give the command back, using different options.
Whatever I may use for an option, the command gives back "no journal files where found".

Is that normal that journalctl bring "no journal files where found" back?
Should i activate something first for having results?
Is that that specific to sfos ?
Would be nice if someone could help giving some small skills for this command please?

Thank you very much in advance for any information about it.
Have a nice sail

PS: For my process analyse, may the following command journalctl _SYSTEMD_UNIT=process_name _PID=nnn be interesting ?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by ced117
close date 2017-05-05 13:34:46.193596

Comments

oh my god!!!,devel-su!!! why didn't i come on this point alone? thank you very much @atlochowski

cemoi71 ( 2017-05-05 13:46:33 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-05-05 13:22:48 +0200

atlochowski gravatar image

updated 2017-05-05 13:41:15 +0200

When you receiving ""no journal files where found" usually it means you are logged as a user. To get output from journalctl you have to be root. For example by devel-su command

here you have really nice tutorial for journalctl https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs

about filtering by PID you can make it like this journalctl _PID=1039

edit flag offensive delete publish link more

Comments

hum it works now with devel-su. but with the command that i found journalctl _SYSTEMD_UNIT=process_name it tells back just "logs begin at ...."
Where may i find the log, or print it?
In your tutorial there is an option with -f which (as i undertsand) dsiplay the info in parallel. is that right?
I think it's quite the same with journalctl _PID=1039 right?

cemoi71 ( 2017-05-05 13:55:14 +0200 )edit

_SYSTEMD_UNIT is NOT a process name. Read documentation more carefully.

coderus ( 2017-05-05 14:18:36 +0200 )edit

@coderus in the doc that i found that described "all entries with a field matching the expression are shown", i thought then that is a possibility that i may filter with a specific character-field, which could be my process name, or service...
my source: http://man7.org/linux/man-pages/man1/journalctl.1.html

cemoi71 ( 2017-05-05 15:01:14 +0200 )edit

there is no _SYSTEMD_UNIT=process_name in docs. Read carefully.

coderus ( 2017-05-05 15:03:02 +0200 )edit

@coderus@atlochowski may i pick you both up it this thread? Not to investigate (if you don't want too), but first for giving some tips, on how and what can i do to investigate deeper on the issue.
I'll be glad if you may give some piece of advice. please
That the thread which is the origin of the creation of the above thread.

cemoi71 ( 2017-05-05 15:09:24 +0200 )edit

Question tools

Follow
1 follower

Stats

Asked: 2017-05-05 11:43:57 +0200

Seen: 372 times

Last updated: May 05 '17