You are not logged in.

#1 2015-08-04 20:48:05

misal6666
Member
Registered: 2015-07-31
Posts: 29

[SOLVED] Systemd-analyze

I am using openbox with arch installed on SSD. the boot taked 11 .88 seconds as of now.

Pastebin files for systemd-analze blame and systemd-analyze critical chain

http://pastebin.com/GyZyJKF7

http://pastebin.com/YEKZhbzF

this is the systemd-analyze ctitical chain command now reads on my system. I disabled systectl.wicd.service to achieve a faster boot speed thinking that i might be start that when I boot into my system from login manager.

to do that i entered systemctl enable wicd.service.

but i guess this is not enough as it did not start on logging in.
Do i have to start a daemon for wicd?

if so how can i start it?

also any other idea how i may boot a little faster judging from systemd-analyze

Last edited by misal6666 (2015-08-07 19:21:27)

Offline

#2 2015-08-04 20:52:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Systemd-analyze


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-08-07 17:21:12

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

I started to learn how to create a bash script so that  I could start WICD with it without having to enable WICD usign systemctl enable which costs me boot time.

I created a basic script which is as follows

http://pastebin.com/rGz0yuB5

I also edited sudoers file and added this line

username ALL=(ALL) NOPASSWD: /home/misal/Scripts/wicd.sh

but this still asks for password. Is everything correct here? Am i missing something?


Also i have edited my grub configuration so that the grub does not ask me to choose what to boot and just boots to the default value. the grub doesnt show me the menu but I think it still waits for me to enter an input as I have a blank screen where i would have seen my grub.

would you please have a look at my grub configuration

http://pastebin.com/wEPAEgbr

Last edited by misal6666 (2015-08-07 17:28:05)

Offline

#4 2015-08-07 17:48:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] Systemd-analyze

Adding that line to sudoers will allow you to start your script without password when invoked as such:

sudo /home/misal/Scripts/wicd.sh


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2015-08-07 18:21:06

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

ewaller wrote:

Adding that line to sudoers will allow you to start your script without password when invoked as such:

sudo /home/misal/Scripts/wicd.sh



thanks for the reply.

Can i add that to my .xinitrc file to execute on boot?

EDIT:

tried that and its still asking for my password. I tried it running directly from terminal and it asked me for my password then too

Last edited by misal6666 (2015-08-07 18:25:34)

Offline

#6 2015-08-07 18:25:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] Systemd-analyze

Well, it won't execute on boot, but it will run when you start X.  I think that will work from .xinitrc.  Try it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2015-08-07 18:27:01

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

ewaller wrote:

Well, it won't execute on boot, but it will run when you start X.  I think that will work from .xinitrc.  Try it.

i have given the wicd.sh 777 chmod so that it has all permissions. I failed to mention that before. After doing all this it still asked me for my password. Did I do something wrong?

Offline

#8 2015-08-07 18:44:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] Systemd-analyze

How did you run it?  As to the permissions, that should work.  Not the best choice allowing everyone to change an executable that you are going to allow everyone to run as root, but that is a different issue.

You must run the script through sudo.  If you are (and it appears that you are) running through sudo,
I assume the sudoers file does not literally have "username" but rather has your user's name.
How did you edit /etc/sudoers?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2015-08-07 18:49:55

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

ewaller wrote:

How did you run it?  As to the permissions, that should work.  Not the best choice allowing everyone to change an executable that you are going to allow everyone to run as root, but that is a different issue.

You must run the script through sudo.  If you are (and it appears that you are) running through sudo,
I assume the sudoers file does not literally have "username" but rather has your user's name.
How did you edit /etc/sudoers?


i ran the script from terminal as sudo /home/misal/Scripts/wicd.sh  and it still asked for my password which AFAIK it should not.


also I tried both putting username and my USERNAME i.e. misal in sudoers file. Which one is correct format?

here is what my suoders file reads

http://pastebin.com/KJw4cDNH

Offline

#10 2015-08-07 19:03:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Systemd-analyze

You are doing this wrong. If wicd is your issue, trying some hacky approach to work around systemd won't help.

Either live with the fact that it is slow, or use something faster like systemd-networkd or connman.


If you insist on this approach, remove the space between NOPASSWD: and the path.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2015-08-07 19:04:24

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

misal6666 wrote:
ewaller wrote:

How did you run it?  As to the permissions, that should work.  Not the best choice allowing everyone to change an executable that you are going to allow everyone to run as root, but that is a different issue.

You must run the script through sudo.  If you are (and it appears that you are) running through sudo,
I assume the sudoers file does not literally have "username" but rather has your user's name.
How did you edit /etc/sudoers?


i ran the script from terminal as sudo /home/misal/Scripts/wicd.sh  and it still asked for my password which AFAIK it should not.


also I tried both putting username and my USERNAME i.e. misal in sudoers file. Which one is correct format?

here is what my suoders file reads

http://pastebin.com/KJw4cDNH


got it to work. there was another entry of %wheel group that was overwriting my newly added line. removing that line made it work. thanks a lot for all your help.

Offline

#12 2015-08-07 19:14:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED] Systemd-analyze

misal is the correct entry.  Let me go play with sudo for a bit...

Edit.... Never mind smile   Glad it is solved.
Edit 2:  Remember to mark you thread as solved.

Last edited by ewaller (2015-08-07 19:16:22)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#13 2015-08-07 19:22:06

misal6666
Member
Registered: 2015-07-31
Posts: 29

Re: [SOLVED] Systemd-analyze

ewaller wrote:

misal is the correct entry.  Let me go play with sudo for a bit...

Edit.... Never mind smile   Glad it is solved.
Edit 2:  Remember to mark you thread as solved.


thanks for all your help. marked as solved

Offline

Board footer

Powered by FluxBB