Re: [systemd-devel] Systemd-analyze time not giving kernal bootup time.

2019-01-28 Thread deepan muthusamy
"systemd-analyze time" directly provides time.
I don't know about journalctl MESSAGE_ID.

On Mon, 28 Jan 2019, 5:40 pm Mantas Mikulėnas  On Mon, Jan 28, 2019 at 11:22 AM deepan muthusamy 
> wrote:
>
>> My target(RCAR-H3) runs with yocto project have boot up time of 13
>> seconds before init starts as of my observation. because I am starting
>> Weston in basic.target which is starting after 13 seconds from the time I
>> pressed power button.
>>
>> Note: I am booting the board from SD card(The image is in SD card).
>>
>> "Systemd-analyze time " giving "Startup finished in 11.814s(userspace) =
>> 13.519s".
>> It is not giving kernal bootup time.
>>
>
> Which timestamps do you see from:
>
> journalctl MESSAGE_ID=b07a249cd024414a82dd00cd181378ff
>
> journalctl MESSAGE_ID=eed00a68ffd84e31882105fd973abdd1
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd-analyze time not giving kernal bootup time.

2019-01-28 Thread deepan muthusamy
The systems version is "systemd 230".

I'm not sure about what the container is. My system having only one user
(root). No other users.

On Mon, 28 Jan 2019, 2:56 pm Jérémy ROSEN  What version of systemd are you using ?
>
> Kernel time is usually not displayed when systemd is run inside a
> container (since it makes no sense). There might be something wrong with
> container detection here, though...
>
> Le lun. 28 janv. 2019 à 10:22, deepan muthusamy 
> a écrit :
>
>> My target(RCAR-H3) runs with yocto project have boot up time of 13
>> seconds before init starts as of my observation. because I am starting
>> Weston in basic.target which is starting after 13 seconds from the time I
>> pressed power button.
>>
>> Note: I am booting the board from SD card(The image is in SD card).
>>
>> "Systemd-analyze time " giving "Startup finished in 11.814s(userspace) =
>> 13.519s".
>> It is not giving kernal bootup time.
>> Help me with this.
>>
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
>
> [image: email] jeremy.ro...@smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature_medium=email_campaign=signature>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd-analyze time not giving kernal bootup time.

2019-01-28 Thread deepan muthusamy
My target(RCAR-H3) runs with yocto project have boot up time of 13 seconds
before init starts as of my observation. because I am starting Weston in
basic.target which is starting after 13 seconds from the time I pressed
power button.

Note: I am booting the board from SD card(The image is in SD card).

"Systemd-analyze time " giving "Startup finished in 11.814s(userspace) =
13.519s".
It is not giving kernal bootup time.
Help me with this.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd service consuming 100% cpu

2018-11-23 Thread deepan muthusamy
If I start my application manually, CPU consumption is less than 2%.
If I start same application as system service, CPU consumption is more than
100%.

There is no cout statements in my application.

I tried to start under a *screen*  as system service. This time consumption
has reduced little bit.

I already asked this question and I got reply that the problem is not
related to systemd, It is related to the application.

But is there anything I have to add when I start as a service?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd logging..

2018-11-21 Thread deepan muthusamy
Hi,
Still iam not clear about what to do in service.

Can u please tell me what are all the things I have to add in .service file
to store all logs into a log file.

On Wed, 21 Nov 2018, 2:23 pm deepan muthusamy  Hi,
> How to log systemd service into log.txt file.
> This file should be available after system  restart also.
> How to do this?
>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd logging..

2018-11-21 Thread deepan muthusamy
Hi,
How to log systemd service into log.txt file.
This file should be available after system  restart also.
How to do this?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] std::cout statements in journalctl

2018-11-09 Thread deepan muthusamy
Will journalctl shows std::cout outputs of a service ?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Data flow is slow

2018-11-08 Thread deepan muthusamy
I created a session bus as system service. And iam connecting to that
session bus. My requirement is like this, that's why I'm doing this.@ Simon.

There is no test program for this. App2 should return the data to app1 and
app1 should show Change in UI. this whole thing taking long time. @ Mantas

On Thu, 8 Nov 2018, 11:28 pm Mantas Mikulėnas  On Thu, Nov 8, 2018 at 3:27 PM deepan muthusamy 
> wrote:
>
>> I have two applications. App1 is UI application. App2 is console
>> application.
>> Both are communicating through Dbus(session). If I press a button in
>> app1, aap2 should receive the data immediately.
>>
>>  If I start both of them manually , they are working as expected.
>>
>> If I start as system service, it is taking around 2 minutes for data to
>> reach from app1 to app2.
>>
>> What can be the possible reasons?
>>
>
> How did you measure this? Can you provide a test program?
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd service taking huge memory

2018-11-08 Thread deepan muthusamy
If I start my application as system service, it is consuming huge memory.
This leads to my system getting slow down.
If I start manually, it's not consuming that much memory.

What can be the possible reasons?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Data flow is slow

2018-11-08 Thread deepan muthusamy
I have two applications. App1 is UI application. App2 is console
application.
Both are communicating through Dbus(session). If I press a button in app1,
aap2 should receive the data immediately.

 If I start both of them manually , they are working as expected.

If I start as system service, it is taking around 2 minutes for data to
reach from app1 to app2.

What can be the possible reasons?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Not able to start Weston dependent application

2018-11-02 Thread deepan muthusamy
Hi,
I followed the steps in
https://gitlab.freedesktop.org/wayland/weston/merge_requests/39/diffs

It's working fine.

Thank you all..

On Wed, 31 Oct 2018, 5:49 pm Jérémy Rosen,  wrote:

>
>
> On 31/10/2018 12:40, Pekka Paalanen wrote:
>
> On Wed, 31 Oct 2018 11:32:45 +0100
> Jérémy Rosen   wrote:
>
>
> socket-activated weston ?
>
> nice :)
>
> Why does weston require logind ? I work in the embedded world and we
> usually disable logind entirely (no users in the "human user" meaning of
> the term)
>
>
> That's when you run Weston as a normal user: logind grants access to
> DRM and input devices and revokes access as well when appropriate.
>
> Ok, no problem, we can deal with that in lots of ways.
>
> I was afraid there was some more tricky stuff (dependencies on dbus API or
> something like that)
>
>
>
> logind is not a hard requirement. That option has usually been
> called for by people who don't have systemd at all. I'm not sure Weston
> has ever been tested on systemd but without logind. Or maybe it works
> and no-one told upstream. :-)
>
> It works and no one told upstream :P
>
> Weston (and wayland in general ) are a boon to the embedded world.
>
> We are regularly asked to do systems with very precise placement for
> different windows coming from different apps
>
> (think of a car, where the map application is usually an html5 in-browser
> application, but you can swith to air-conditionning control which is a
> hand-made Qt application, and the the back camera which is a separate
> Qt+Gstreamer application)
>
> In the bad-old days, we would have to play with X and window-managers like
> Awesome to do that (or write our own window manager which is... hell)
>
> Now, we have weston which is very good at dealing with that (thx IVI mode)
> or we can write or own compositor which is almost as easy as writing a
> normal GUI application (qtcompositor, mainly)
>
> A bit offtopic here, sorry about that.
>
> --
> [image: SMILE] 
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
> Responsable de l'expertise Smile-ECS
>
> [image: email] jeremy.ro...@smile.fr
> [image: phone] +33141402967
> [image: url] http://www.smile.eu
>
> [image: Twitter]  [image: Facebook]
>  [image: LinkedIn]
>  [image: Github]
> 
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> 
>
> [image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread deepan muthusamy
I added both after and requires.What you meant by security feature?@rosan

Type I made as simple.@ Lennart

On Wed, 31 Oct 2018, 1:45 pm Jérémy Rosen,  wrote:

> Did you add an "After=" too ? you need both  a Requires= and an After=
> Did you activate any security feature that might hide the wayland socket
> from app2 ?
>
> On 31/10/2018 08:21, deepan muthusamy wrote:
>
> Hi,
> I started app1(this is a UI application) as system service .
> I started app2( this is Weston ) also as system service. But in different
> tty(tty7).
>
> App1 is depended on app2 to start.
> I added that dependency.
>
> App2 is started but app1 not able to find that dependency. Iam getting
> error as not able to find weston.
>
> If I start both manually, it's working fine.
>
>
>
>
> ___
> systemd-devel mailing 
> listsystemd-devel@lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
> --
> [image: SMILE] <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
> Responsable de l'expertise Smile-ECS
>
> [image: email] jeremy.ro...@smile.fr
> [image: phone] +33141402967
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <http://smile.eu/?utm_source=signature_medium=email_campaign=signature>
>
> [image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Not able to start Weston dependent application

2018-10-31 Thread deepan muthusamy
Hi,
I started app1(this is a UI application) as system service .
I started app2( this is Weston ) also as system service. But in different
tty(tty7).

App1 is depended on app2 to start.
I added that dependency.

App2 is started but app1 not able to find that dependency. Iam getting
error as not able to find weston.

If I start both manually, it's working fine.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Launch at tty7

2018-10-30 Thread deepan muthusamy
I have one doubt that, if I launch app1 under tty1 andapp2 at tty7. If I
add after dependency in app2 for app1( After=app1.service in app2.service).
will this dependency work?




How to launch an application at specific try(like under tty7)?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Dbus service

2018-09-18 Thread deepan muthusamy
What is the difference between dbus service and bus-activatable service?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Path based activation error

2018-09-14 Thread deepan muthusamy
I subscribed to mailing list, eventhough iam not getting mail notification
everytime. So in continuation to previous message
https://lists.freedesktop.org/archives/systemd-devel/2018-September/041365.html

I want my myservice.service should start when this path is available.

Yaa, Path unit should stop when triggered unit stops.


Yaa, myservice.service exists and in working condition.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Path based activation error.

2018-09-14 Thread deepan muthusamy
Hi,
My myservice.path is as follows:

*[Unit]*
*PartOf=myservice.service*

*[Path]*
*PathExists=/run/user/1000*

*[Install]*
*WantedBy=basic.target*



Iam getting the following error:

*myservice.path: Refusing to start, unit to trigger not loaded.*

Want can be the possible reason for error.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Path based activation error

2018-09-14 Thread deepan muthusamy
Hi,
My myservice.path is as follows:

[Unit]
PartOf=myservice.service

[Path]
PathExists=/run/user/1000

[Install]
WantedBy=basic.target



Iam getting the following error:

myservice.path: Refusing to start, unit to trigger not loaded.

Want can be the possible reason for error??
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Path based activation

2018-09-12 Thread deepan muthusamy
In my case , I want to check whether the filesystem path is available or
not ( for example, /run/user/0). If this path is available I want to start
my service.

How to do this?? Can I use the same method which you mentioned?

On Wed, 12 Sep 2018, 7:09 pm Mantas Mikulėnas,  wrote:

> On Wed, Sep 12, 2018 at 4:19 PM deepan muthusamy 
> wrote:
>
>> Can anyone give a demo of how path based activation works?
>>
>> I referred cups Daemon, but the same thing not working for me..
>>
>
> Path based activation is one of the simpler types – it waits for inotify
> events on the specified locations, and starts your service on any events.
> Note that it *does not* forward the event information to the service – that
> needs to be handled by the program itself.
>
> foo.path:
> [Path]
> PathModified=/tmp/something.txt
>
> foo.service:
> [Service]
> Type=oneshot
> ExecStart=/bin/cp -av /tmp/something.txt /tmp/backup.txt
>
> # systemctl start foo.path
> # echo Hello > /tmp/something.txt
> # ls -l /tmp/{something,backup}.txt
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Path based activation

2018-09-12 Thread deepan muthusamy
Can anyone give a demo of how path based activation works?

I referred cups Daemon, but the same thing not working for me..
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Permanent environment variable

2018-09-12 Thread deepan muthusamy
How to set up environmental variable common for all system services.

For example,
If I set environment variable(Environment="variable=data") in
mysystem.service file, it's scope is in that file only. I want that
variable available to all service file. What should I do?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Touch enabled application not working

2018-08-29 Thread deepan muthusamy
We are using Weston, we started Weston as service and added that dependency
to hmi application.

Iam starting as user service.

There is no reason for starting as basic.target. For testing purpose , iam
using basic.target.

I don't think so, it depends on any hardware. As of my understanding only
Weston is enough.

Iam getting error log related to hmi. "application initialization failed".





On Wed, 29 Aug 2018, 8:13 pm Mantas Mikulėnas,  wrote:

> Does your application report any errors after failed startup?
>
> How is the "touch feature" implemented? Does it depend on any services,
> any hardware devices?
>
> Are you starting the application as a system service, or as a --user
> service?
>
> Why are you using basic.target?
>
> On Wed, Aug 29, 2018 at 3:55 PM deepan muthusamy 
> wrote:
>
>> Hi,
>> I have a hmi application(without touch feature enabled) created using
>> cgi. If I start that application under basic.target, it's running
>> successfully.
>>
>> But if I start that application( with touch enabled) under basic.target
>> it is failing to start.
>> Even systemctl --user start hmi.service also failing to start.
>> Only difference between them is touch feature.
>> Am I have to start any other service bedore for touch feature?
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Touch enabled application not working

2018-08-29 Thread deepan muthusamy
Hi,
I have a hmi application(without touch feature enabled) created using cgi.
If I start that application under basic.target, it's running successfully.

But if I start that application( with touch enabled) under basic.target it
is failing to start.
Even systemctl --user start hmi.service also failing to start.
Only difference between them is touch feature.
Am I have to start any other service bedore for touch feature?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] not able to access system service from session service

2018-08-20 Thread deepan muthusamy
Hi,
Thank you for the reply. Since I can't use session service to access system
service, how can I start a application as service having session dbus as
system service?

On Tue, 21 Aug 2018, 5:22 am , 
wrote:

> Send systemd-devel mailing list submissions to
> systemd-devel@lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> or, via email, send a message with subject or body 'help' to
> systemd-devel-requ...@lists.freedesktop.org
>
> You can reach the person managing the list at
> systemd-devel-ow...@lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of systemd-devel digest..."
>
>
> Today's Topics:
>
>1.  Enforcing journald diskspace limit. (Frédéric HILPERT)
>2.  Not able to access system device from session service
>   (deepan muthusamy)
>3. Re:  Not able to access system device from session service
>   (Silvio Knizek)
>4.  systemd oneshot service stop on shutdown problem
>   (Radoslaw Garbacz)
>5. Re:  systemd oneshot service stop on shutdown problem
>   (Filipe Brandenburger)
>6. Re:  systemd oneshot service stop on shutdown problem
>   (Ryan Gonzalez)
>
>
> --
>
> Message: 1
> Date: Mon, 20 Aug 2018 14:08:49 +0200
> From: Frédéric HILPERT 
> To: systemd-devel@lists.freedesktop.org
> Subject: [systemd-devel] Enforcing journald diskspace limit.
> Message-ID: 
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi,
>
> I have a question about systemd. Not wanting to create an issue on
> githbub because there are already plenty and this may not be a bug.
>
> I have a 1GB /var/log/ partition (on a stock Centos 7) and set
> SystemMaxUse=150M in journald configuration. When I restart journald I
> have this message :
>
> /systemd-journal[53564]: Permanent journal is using 8.0M (max allowed
> 101.4M, trying to leave 152.1M free of 501.0M available → current limit
> 101.4M).//
> /
> Everything looks fine here, but a few days later :
> /
> //MyServer# journalctl --disk-usage //
> //Archived and active journals take up 232.8M on disk.//
> //MyServer# du -sh /var/log/journal///
> //185M/var/log/journal//
>
> --> Am I missing something in order to enforce journal not use more than
> 150 (or 101.4)MB ?
>
> Regards,
> Frédéric HILPERT
>
>
>
>
> --
>
> Message: 2
> Date: Mon, 20 Aug 2018 19:22:09 +0530
> From: deepan muthusamy 
> To: Systemd ,
> d...@lists.freedesktop.org
> Subject: [systemd-devel] Not able to access system device from session
> service
> Message-ID:
>  2jyenr...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I started one application as system service in /etc/systemd/system by
> giving command "systemctl  start mysystem.service".
> I have one more application which i have to start as session service in
> etc/systemd/user by giving command "systemctl --user start
> mysession.service".
>
> My session.service  has dependency on mysystem.service, so I mentioned in
> Requires and After command in session.service.
>
> But when iam trying to session.service it is showing "mysystem.service" not
> found. Can anyone help me with this?
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/systemd-devel/attachments/20180820/41e5b22f/attachment-0001.html
> >
>
> --
>
> Message: 3
> Date: Mon, 20 Aug 2018 15:57:28 +0200
> From: Silvio Knizek 
> To: systemd-devel@lists.freedesktop.org
> Subject: Re: [systemd-devel] Not able to access system device from
> session service
> Message-ID: <9064a335891804c359801498667c1dd603a8cf43.ca...@gmx.net>
> Content-Type: text/plain; charset="UTF-8"
>
> Am Montag, den 20.08.2018, 19:22 +0530 schrieb deepan muthusamy:
> > I started one application as system service in /etc/systemd/system by
> > giving command "systemctl  start mysystem.service".
> > I have one more application which i have to start as session service
> > in etc/systemd/user by giving command "systemctl --user start
> > mysession.service".
> >
> > My session.service  has dependency on mysystem.service, so I
> > mentioned in Requires and After command in session.service.
> >
> > But when iam trying to session.service it is showing
> > &quo

[systemd-devel] Not able to access system device from session service

2018-08-20 Thread deepan muthusamy
I started one application as system service in /etc/systemd/system by
giving command "systemctl  start mysystem.service".
I have one more application which i have to start as session service in
etc/systemd/user by giving command "systemctl --user start
mysession.service".

My session.service  has dependency on mysystem.service, so I mentioned in
Requires and After command in session.service.

But when iam trying to session.service it is showing "mysystem.service" not
found. Can anyone help me with this?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Access session bus from service application

2018-08-14 Thread deepan muthusamy
Thank you for the clarification.

On Tue, 14 Aug 2018, 3:22 pm Mantas Mikulėnas,  wrote:

> On Tue, Aug 14, 2018 at 11:49 AM deepan muthusamy 
> wrote:
>
>> I have to start all my applications through systemd. But when I am trying
>> to start even A2, A3, A4 also i am facing same problem.
>>
>
> Sounds like you *don't have* a session bus at all, then?
>
> If 100% of your applications start via systemd .services, then you should
> start the bus via systemd .service as well. (For example, create a
> "dbus-session.service"; make sure to specify a static --address. Ideally
> create a matching .socket unit as well.)
>
> Once the session bus is running, your other programs/services need to be
> told about its address (via environment variables).
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Access session bus from service application

2018-08-14 Thread deepan muthusamy
I am not that much clear about booting process, but I will explain what I
want to do, please help me with this.

My system has no login user except root. I logged in as root.

I have an application called A1 which has to communicate to systemd to
monitor other process such as A2 ,A3 and A4.

Process A2, A3 ,A4 are communicating to A1 through session dbus. This is
the implementation.

But all process has to be started at boot time as services under user
defined target levels which I know how to do.

This is my requirement.

My problem is iam not able to start  as service since when my application
trying to get session dbus connection, it  is failing.

I come to know that it is possible from your previous replies. But I don't
know how to do that. Can you please help me this?




On Tue, 14 Aug 2018, 10:15 am Mantas Mikulėnas,  wrote:

> On Tue, Aug 14, 2018 at 7:21 AM deepan muthusamy 
> wrote:
>
>> I have an application which has to communicate with systemd to monitor
>> other process and it has to communicate with other session applications ,
>> so my application is designed to communicate to both session dbus and
>> system dbus. And also my application has to be started as service by
>> systemd. How to do this?
>>
>
> If it's a session application, why does it have to be started by systemd?
> That isn't a requirement for accessing the system bus; any application can
> access the system bus.
>
> --
> Mantas Mikulėnas
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Access session bus from service application

2018-08-13 Thread deepan muthusamy
I have an application which has to communicate with systemd to monitor
other process and it has to communicate with other session applications ,
so my application is designed to communicate to both session dbus and
system dbus. And also my application has to be started as service by
systemd. How to do this?

Iam facing process termination when try trying to access session dbus, only
when iam starting as boot process. If I run manually or run with init.d, my
application is running sucessfully. Any way to solve this issue?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd service not connecting to session dbus

2018-08-13 Thread Deepan Muthusamy
My application is a user created application which will interact with systemd 
to monitor other running process, so I have to connect to system dbus. At the 
same time My application has to communicate with other session applications, so 
Iam communicating using session bus.Also My application has to start at boot 
time by systemd. Is it possible? If possible what are all the changes I have to 
make?

My target board is rcar H3. My target os is yocto project with genivi meta ivi 
system.


DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210

From: Mantas Mikulėnas 
Sent: Monday, August 13, 2018 7:13 PM
To: Deepan Muthusamy
Cc: Systemd
Subject: Re: [systemd-devel] systemd service not connecting to session dbus

On Mon, Aug 13, 2018 at 3:37 PM Deepan Muthusamy 
mailto:deepan.muthus...@tcs.com>> wrote:

My application has to communicate to both system dbus and session dbus and I 
want to start my application through systemd. How to do that?

Everything can use the system bus, but only applications belonging to the 
session can use the session bus. Trying to access user sessions from within a 
system service is somewhat contradictory (is it a system service *or* is it a 
desktop app?). It *is* technically possible but you need a really good reason 
as well as to consider that there can be more than one session, less than one 
session, that sessions can appear and disappear at any time... The only common 
exception are tightly integrated embedded distros, where exactly one permanent 
session exists.

--
Mantas Mikulėnas
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd service not connecting to session dbus

2018-08-13 Thread Deepan Muthusamy

My application has to communicate to both system dbus and session dbus and I 
want to start my application through systemd. How to do that?
DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210


From: systemd-devel  on behalf of 
systemd-devel-requ...@lists.freedesktop.org 

Sent: Monday, August 13, 2018 3:21 PM
To: systemd-devel@lists.freedesktop.org
Subject: systemd-devel Digest, Vol 100, Issue 16

Send systemd-devel mailing list submissions to
systemd-devel@lists.freedesktop.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
or, via email, send a message with subject or body 'help' to
systemd-devel-requ...@lists.freedesktop.org

You can reach the person managing the list at
systemd-devel-ow...@lists.freedesktop.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of systemd-devel digest..."


Today's Topics:

   1.  systemd service not connecting to session dbus
      (Deepan  Muthusamy)
   2. Re:  systemd service not connecting to session dbus
  (Jérémy Rosen)
   3.  Restarting a service as user instead as root (Cecil Westerhof)
   4. Re:  Restarting a service as user instead as root (Reindl Harald)
   5. Re:  Restarting a service as user instead as root (Silvio Knizek)


--

Message: 1
Date: Mon, 13 Aug 2018 07:17:51 +0000
From: "Deepan  Muthusamy" 
To: "systemd-devel@lists.freedesktop.org"

Subject: [systemd-devel] systemd service not connecting to session
dbus
Message-ID: <1534144671090.92...@tcs.com>
Content-Type: text/plain; charset="iso-8859-1"


I have an application which has to communicate with session dbus. If I start my 
application binary manually or start using Init.d, it is connecting to session 
d-bus.

But if I start my application through systemd, it is failing to start.  I tried 
to start using systemctl start my-service-name, this time also it is failing.


And also I go through the answer given by keithel in 
https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-session-d-bus-on-headless-system
 .

Still Iam facing the same error.


The .service fail is as follows:


[Unit]
Requires= dbus.socket
After= dbus.socket

[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/myExe
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target


Operating system:
Ubuntu 16.04 (64-bit)









DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/systemd-devel/attachments/20180813/897d3337/attachment-0001.html>

--

Message: 2
Date: Mon, 13 Aug 2018 10:10:21 +0200
From: Jérémy Rosen 
To: systemd-devel@lists.freedesktop.org
Subject: Re: [systemd-devel] systemd service not connecting to session
dbus
Message-ID: <39db67b3-c51f-3cdd-156d-2fc06ae34...@smile.fr>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

There are two types of systemd instances
* system instance (PID1) which controls the machine as a whole
* user instances that are started when the user logs in.

You seem to have a system service (started by the system session). A
system service can't (easily) access the user bus.
The session bus is started by the user instance when the user login. If
the user hasn't logged in yet, the bus isn't started.
Moreover, the user bus is found via an environment variable, which is
not set for system services (even when User= is used)

What are you trying to do exactly ? should your service be a session
service ?

Regards
Jeremy


On 13/08/2018 09:17, Deepan Muthusamy wrote:
> I have an application which has to communicate with session dbus. If I start 
> my application binary manually or start using Init.d, it is connecting to 
> session d-bus.
>
> But if I start my application through systemd, it is failing to start.  I 
> tried to start using systemctl start my-service-name, this time also it is 
> failing.
>
>
> And also I go through the answer given by keithel in 
> https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-s

[systemd-devel] systemd service not connecting to session dbus

2018-08-13 Thread Deepan Muthusamy

I have an application which has to communicate with session dbus. If I start my 
application binary manually or start using Init.d, it is connecting to session 
d-bus.

But if I start my application through systemd, it is failing to start.  I tried 
to start using systemctl start my-service-name, this time also it is failing.


And also I go through the answer given by keithel in 
https://serverfault.com/questions/892465/starting-systemd-services-sharing-a-session-d-bus-on-headless-system
 .

Still Iam facing the same error.


The .service fail is as follows:


[Unit]
Requires= dbus.socket
After= dbus.socket

[Service]
Type=dbus
BusName=org.client
ExecStart=/usr/local/bin/myExe
TimeoutSec=300
WatchdogSec=20

[Install]
WantedBy=basic.target


Operating system:
Ubuntu 16.04 (64-bit)









DEEPAN MUTHUSAMY,
TATA CONSULTANCY SERVICE,
mobile no: +91 8012309210
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel