Jump to content

systemd-analyze


sunrat

Recommended Posts

Try scanning the journal with

journalctl -b -p 3

p is for priority so you can get more errors/warnings with a higher number, 0 is most critical while 7 is debug (all errors). b is for last boot. See man journalctl.

  • Like 1
Link to comment
Share on other sites

securitybreach

This is what I was talking about:

That message is thrown when /run/nologin exists. It's removed by systemd-user-sessions.service. You need something, whether it be a getty or a graphical DM to pull in and run that service.

I suspect your unit is of the wrong type. Long running units are never of the "Oneshot" type.

Not the same thing but I thought maybe it was relevant.

 

Try scanning the journal with

journalctl -b -p 3

p is for priority so you can get more errors/warnings with a higher number, 0 is most critical while 7 is debug (all errors). b is for last boot. See man journalctl.

 

Nice roger, I'll have to remember that.

Link to comment
Share on other sites

I recon that is a red herring Josh 1fishred.gif

 

Here is what I get when I try sunrat's excellent guru geek tip,

 

-- Logs begin at Tue 2014-07-15 01:14:58 BST, end at Thu 2014-07-17 13:05:50 BST. --

Jul 17 12:56:05 longship kernel: ACPI: [Package] has zero elements (ffff8800bf58a5c0)

Jul 17 12:56:06 longship kernel: kvm: disabled by bios

Jul 17 12:56:06 longship kernel: kvm: disabled by bios

Jul 17 12:56:06 longship dhcpcd[238]: no valid interfaces found

Jul 17 12:56:08 longship systemd-udevd[187]: error changing net interface name eth0 to enp0s16: Device or resource busy

Jul 17 12:57:35 longship systemd[1]: Timed out waiting for device sys-subsystem-net-devices-emp0s16.device.

Jul 17 12:57:35 longship systemd[1]: Dependency failed for dhcpcd on emp0s16.

Jul 17 13:05:50 longship kernel: end_request: I/O error, dev fd0, sector 0

 

I think that this is the problem,

 

[root@longship bloodaxe]# systemctl is-enabled dhcpcd.service
enabled
[root@longship bloodaxe]# systemctl is-enabled dhcpcd@enp0s16.service
Failed to get unit file state for dhcpcd@enp0s16.service: No such file or directory
[root@longship bloodaxe]# systemctl is-enabled dhcpcd.service
enabled
[root@longship bloodaxe]# systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled)
Active: active (running) since Thu 2014-07-17 12:56:06 BST; 27min ago
Process: 238 ExecStart=/usr/bin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 240 (dhcpcd)
CGroup: /system.slice/dhcpcd.service
	 └─240 /usr/bin/dhcpcd -q -b

Jul 17 12:56:09 longship dhcpcd[240]: eth0: soliciting a DHCP lease
Jul 17 12:56:09 longship dhcpcd[240]: enp0s17: adding address fe80::3d82:a542:cf22:a09d
Jul 17 12:56:09 longship dhcpcd[240]: enp0s17: waiting for carrier
Jul 17 12:56:09 longship dhcpcd[240]: eth0: offered 192.168.1.2 from 192.168.1.1
Jul 17 12:56:09 longship dhcpcd[240]: eth0: soliciting an IPv6 router
Jul 17 12:56:09 longship dhcpcd[240]: wlp0s10f1u9: soliciting a DHCP lease
Jul 17 12:56:15 longship dhcpcd[240]: eth0: leased 192.168.1.2 for 86400 seconds
Jul 17 12:56:15 longship dhcpcd[240]: eth0: adding route to 192.168.1.0/24
Jul 17 12:56:15 longship dhcpcd[240]: eth0: adding default route via 192.168.1.1
Jul 17 12:56:22 longship dhcpcd[240]: eth0: no IPv6 Routers available
[root@longship bloodaxe]# systemctl is-enabled dhcpcd@enp0s16.service
Failed to get unit file state for dhcpcd@enp0s16.service: No such file or directory
[root@longship bloodaxe]# systemctl status dhcpcd@enp0s16.service
● dhcpcd@enp0s16.service - dhcpcd on enp0s16
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
Active: inactive (dead)

 

I have seen some of the info in my exploration and some shows up at the booting screen.I am really puzzled as to why eth0 shows up. I'll try the below and rebbot to see what happens.

 


[root@longship bloodaxe]# systemctl disable dhcpcd@enp0s17.service
[root@longship bloodaxe]# systemctl disable dhcpcd@wlp0s10f1u9.service
[root@longship bloodaxe]# systemctl enable dhcpcd@enp0s16.service
Created symlink from /etc/systemd/system/multi-user.target.wants/dhcpcd@enp0s16.service to /usr/lib/systemd/system/dhcpcd@.service.

 

I have been on some side quests some of which were a success and some that have led me deeper into the dark. :breakfast:

Edited by abarbarian
Link to comment
Share on other sites

securitybreach

The command:

ip link
will give you your device names. You should not be using eth0 naming scheme anyway.
Link to comment
Share on other sites

Yes I know about the eth0 change. My used device name is " enp0s16 " I have tried it several different ways. At the last try I have "dhcpcd" "enabled" and everything else "disabled" and it looks like the eth0 thing is not occurring.

 

]# systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces																													 
  Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled)
  Active: active (running) since Thu 2014-07-17 16:06:39 BST; 4min 32s ago
 Process: 236 ExecStart=/usr/bin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 239 (dhcpcd)
  CGroup: /system.slice/dhcpcd.service
	   └─239 /usr/bin/dhcpcd -q -b

Jul 17 16:06:42 longship dhcpcd[239]: enp0s17: adding address fe80::3d82:a5...9d
Jul 17 16:06:43 longship dhcpcd[239]: enp0s17: waiting for carrier
Jul 17 16:06:43 longship dhcpcd[239]: enp0s16: carrier acquired
Jul 17 16:06:43 longship dhcpcd[239]: enp0s16: IAID f3:91:8d:bf
Jul 17 16:06:43 longship dhcpcd[239]: enp0s16: rebinding lease of 192.168.1.2
Jul 17 16:06:43 longship dhcpcd[239]: enp0s16: soliciting an IPv6 router
Jul 17 16:06:48 longship dhcpcd[239]: enp0s16: leased 192.168.1.2 for 86400...ds
Jul 17 16:06:48 longship dhcpcd[239]: enp0s16: adding route to 192.168.1.0/24
Jul 17 16:06:48 longship dhcpcd[239]: enp0s16: adding default route via 192....1
Jul 17 16:06:56 longship dhcpcd[239]: enp0s16: no IPv6 Routers available
Hint: Some lines were ellipsized, use -l to show in full.

 

I can get a internet connection with the set up at present so that is ok.

 

However I do not know what this means,

 

Jul 17 16:08:09 longship systemd[1]: Timed out waiting for device sys-subsystem-
Jul 17 16:08:09 longship systemd[1]: Dependency failed for dhcpcd on emp0s16.

 

as it is showing after I have a internet connection. ???

 

Also this has just appeared,

 

]# journalctl -b -p 3
-- Logs begin at Tue 2014-07-15 01:14:58 BST, end at Thu 2014-07-17 16:13:14 BST
Jul 17 16:06:39 longship kernel: ACPI: [Package] has zero elements (ffff8800bf91
Jul 17 16:06:39 longship kernel: kvm: disabled by bios
Jul 17 16:06:39 longship kernel: kvm: disabled by bios
Jul 17 16:06:39 longship dhcpcd[236]: no valid interfaces found
Jul 17 16:08:09 longship systemd[1]: Timed out waiting for device sys-subsystem-
Jul 17 16:08:09 longship systemd[1]: Dependency failed for dhcpcd on emp0s16.
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 31, Ch 00000001, engmask 00000101, intr 10000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 0):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 0):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x504224=0x80000049 0x504228=0x2008e802 0x50422c=0x168022 0x504234=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 1):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 1):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x504a24=0x80000049 0x504a28=0x20280802 0x504a2c=0x168023 0x504a34=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 2):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 0, TPC 2):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x505224=0x80000049 0x505228=0x2028ba02 0x50522c=0x168082 0x505234=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 0):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 0):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x50c224=0x80000049 0x50c228=0x2008b502 0x50c22c=0x168043 0x50c234=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 1):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 1):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x50ca24=0x80000049 0x50ca28=0x2008a702 0x50ca2c=0x168002 0x50ca34=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 2):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 2):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x50d224=0x80000049 0x50d228=0x20287b02 0x50d22c=0x168003 0x50d234=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 3):	 TEX LAYOUT
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, NVRM: Graphics TEX Exception on (GPC 1, TPC 3):	 TEX NACK / Page Fault
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x50da24=0x80000049 0x50da28=0x20086602 0x50da2c=0x168042 0x50da34=0x40000000
Jul 17 16:13:14 longship kernel: NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ChID 0001, Class 0000902d, Offset 000002ac, Data 00000003

 

:nuke: :nuke: :nuke: :rant: :rant: :rant: :rant: :nuke: :nuke: :nuke: :w00tx100: :w00tx100: :w00tx100: :o :o :o :o :o :breakfast:

 

It is too hot for troubkeshooting and I am away at the weekend so thanks for the thoughts folks an I'll be back later.

Link to comment
Share on other sites

I also ran,

 

]# systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 30.204s
└─multi-user.target @1min 30.204s
 └─getty.target @839ms
   └─getty@tty1.service @839ms
  └─[color=#ff0000]systemd-user-sessions.service @807ms +7ms[/color]
    └─basic.target @714ms
	  └─timers.target @712ms
	    └─systemd-tmpfiles-clean.timer @712ms
		  └─sysinit.target @709ms
		    └─[color=#ff0000]systemd-rfkill@rfkill0.service @922ms +5ms[/color]
			  └─system-systemd\x2drfkill.slice @921ms
			    └─system.slice @141ms
				  └─-.slice @140ms

 

The two services in red are a bot of a hold up but the main culprita seems to be,

 

graphical.target @1min 30.204s
└─multi-user.target @1min 30.204s

 

Which may or may not be connected with the info in my last post.

 

:breakfast:

Link to comment
Share on other sites

My install is really old. At the time that I installed it, the wiki recommended using dhcpcd.@service for a system with a single, wired interface. I am still using it.

 

Generally, it is trouble free unless something like a lightning strike knocks out the wired side of my router, an ethernet switch, and the NIC on the MOBO. (Yes, this happened just this week when lightning stuck in my back easement where the Brighthouse cable is.)

Link to comment
Share on other sites

BTW why are you using dhcpcd.service instead of netctl. Netctl is the "official" network client in Arch and systemd:

https://wiki.archlin...l#Configuration

 

Well I followed the official guide.However I seem to not be able to use "systemctl enable dhcpcd@interface_name.service" as my postings above show. So I used your hack from your tutorial in the Classroom.

 

If you only use a wired network connection, you do not need a network management service and you can simply enable the dhcpcd service:

# systemctl enable dhcpcd.service

 

:228823:

Dynamic IP Using dhcpcdIf you only use a single fixed wired network connection, you do not need a network management service and can simply enable the dhcpcd service for the interface:# systemctl enable dhcpcd@interface_name.service
By the way I could only make out a few words of Russian from that link you gave. :harhar: Are you a secret spy for the reds then :hysterical:

 

Oh my goodness I have just realised. :thudna5: Josh is really a ruskie cell of three people who work 8 hour shifts around the clock.An if they do not read the daily reports thoroughly then they do not know what has been said or done by their fellow workers. Your cover is blown Josh or should that be Ivan and Ivan and Boris. :Laughing: :Laughing: :Laughing: :Laughing: :Laughing:

 

My install is really old. At the time that I installed it, the wiki recommended using dhcpcd.@service for a system with a single, wired interface. I am still using it.Generally, it is trouble free unless something like a lightning strike knocks out the wired side of my router, an ethernet switch, and the NIC on the MOBO. (Yes, this happened just this week when lightning stuck in my back easement where the Brighthouse cable is.)
Tough luck amenditman. Do you not use surge protectors on you lecky stuff. All of mine is protected with surge cable extensions since a strike blew out a modem a long time ago. Luckily that is all that blew though. :breakfast: Edited by abarbarian
  • Like 1
Link to comment
Share on other sites

I have everything on UPS batteries with surge protectors.

This strike was so close it rattled the entire house.

Also, I believe the surge came in on the coax/ethernet line, not the main power line.

 

I live in the lightning capitol of the world and this is the first time in about 20 years I have lost anything to lightning.

Last time it was a TV which got fried. That one definitely got fired on the low voltage signal side of things, cable TV.

The only reason to use Verizon FIOS, fiber optic cable to the house would have prevented this.

Link to comment
Share on other sites

securitybreach
Oh my goodness I have just realised. :thudna5: Josh is really a ruskie cell of three people who work 8 hour shifts around the clock.An if they do not read the daily reports thoroughly then they do not know what has been said or done by their fellow workers. Your cover is blown Josh or should that be Ivan and Ivan and Boris. :Laughing: :Laughing: :Laughing: :Laughing: :Laughing:

 

Darn, you gave away my cover.... I hear the black helicopters now.. "Red team go!" :ph34r: :Smiley-IPB-400: :help: :smashcomp:

Link to comment
Share on other sites

I have everything on UPS batteries with surge protectors.

This strike was so close it rattled the entire house.

Also, I believe the surge came in on the coax/ethernet line, not the main power line.

 

I live in the lightning capitol of the world and this is the first time in about 20 years I have lost anything to lightning.

Last time it was a TV which got fried. That one definitely got fired on the low voltage signal side of things, cable TV.

The only reason to use Verizon FIOS, fiber optic cable to the house would have prevented this.

 

http://www.broadbandbuyer.co.uk/products/2859-belkin-f9s620uk2m/

 

Ah right No cable where I live but I use a surge protector with telephone protection as well. On other sockets I use just a single surge protector plug.A rattling house must have been pretty exciting. :th_run-around-smiley:

 

One thought, is it also trying to get a IPV6 address when your router is not configured for IPV6?

 

Yup I think it is looking for a IPV6.

 

This may work for your simple dhcpcd setup: https://wiki.archlin...amic_IP_address

 

You gave details of your Dynamic earlier in the thread and I have it in mind. I would rather trouble shoot as I am as setting it up would be another layer of stuff to think about. I can connect ok but systemd keeps throwing up queries about the named interface ie:"enp0s16".

I have shaved a second or so of boot but still have the 1min 30 sec user space time.

 

# systemd-analyze
Startup finished in 6.959s (kernel) + 1min 30.320s (userspace) = 1min 37.279s

 

Dhcpcd seems much faster now.

 

87ms systemd-vconsole-setup.service
	    66ms systemd-logind.service
	    53ms alsa-restore.service
	    52ms dhcpcd.service
	    49ms systemd-fsck@dev-disk-by\x2duuid-57d782bb\x2dee4d\x2d430f\x2d92
	    49ms systemd-udev-trigger.service
	    44ms user@1000.service
	    42ms systemd-tmpfiles-clean.service
	    37ms systemd-journal-flush.service

 

So I think that side is mainly sorted, I will have a look again regarding Dynamic and the IPV6 thingy.

 

Delay seems to be with mounts and some weird graphic stuff.

 

No sweat, same as the spacefm adventure it is a learning experience, a chance to fill in gaps.

 

At the moment I am running the new os which has auto magically used some of my settings from the old install on another drive. :laugh:

 

Just for interest as the results change everytime I try something new. here is the output of,

 

 

]# systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 30.320s
└─multi-user.target @1min 30.320s
 └─systemd-logind.service @1.068s +66ms
   └─basic.target @1.065s
  └─timers.target @1.064s
    └─systemd-tmpfiles-clean.timer @1.064s
	  └─sysinit.target @1.063s
	    └─systemd-update-utmp.service @1.051s +9ms
		  └─systemd-tmpfiles-setup.service @634ms +415ms
		    └─local-fs.target @623ms
			  └─run-user-1000.mount @47.607s
			    └─local-fs-pre.target @238ms
				  └─systemd-tmpfiles-setup-dev.service @218ms +18ms
				    └─kmod-static-nodes.service @169ms +12ms
					  └─system.slice @153ms
					    └─-.slice @152ms

 

Of for a weekends rest. :th_action-smiley-066:

Link to comment
Share on other sites

Try increasing the priority number in journalctl -b -p 4 or -p 5.

Check your UUIDs in fstab against those reported by blkid.

 

Also you don't need to be root to run journalctl or systemd-analyze.

  • Like 1
Link to comment
Share on other sites

securitybreach

You mus have a faulty Arch set up. See Post 27 at the top of the page. :tease:

 

Actually you can run almost all of the other systemd commands except starting/stoping daemons and journalctl with those switches. I run journalctl -xn all the time as a normal user.

Edited by securitybreach
Forgot to hit post earlier ;-)
Link to comment
Share on other sites

  • 6 years later...

Ok so I am showing off here. I just can not resist. :harhar:

 

 Put brain in gear befor pressing enter19:38:30-->Fri Dec 18-->~
-->systemd-analyze
Startup finished in 1.024s (kernel) + 900ms (userspace) = 1.924s 
graphical.target reached after 758ms in userspace

:th_0099:

 

I might be able to cut that time down if I fiddle about. :devil: but why would I bother spending the time to do that :hysterical:

Edited by abarbarian
  • +1 1
Link to comment
Share on other sites

  • 1 year later...
abarbarian

Read an article on systemd-analyze so I thought I would check out my rig to see how it was performing. I had not paid much attention to boot times since my last install. Was shocked to see that my boot time was over 30 sec.

Did some digging and somehow I had a fstrim override file which made the pc do a fstrim on every boot. Fiddled around a bit got rid of the override file and set the fstrim timer to run once a week.

Now the pc boots up much faster, in fact so fast that the poor old grey cell has a hard time keeping up.

 

 Put brain in gear before pressing enter11:10:03-->Sat Jul 09-->~
-->systemd-analyze
Startup finished in 1.773s (kernel) + 1.354s (userspace) = 3.127s 
graphical.target reached after 1.333s in userspace.

 

However that time is quite a bit slower than the 2020 result posted above. I did a "systemd-analyze blame" but can not see any real time wasters which I find a bit puzzling.

 

 Put brain in gear before pressing enter11:10:11-->Sat Jul 09-->~
-->systemd-analyze blame
706ms systemd-modules-load.service
227ms dev-nvme0n1p2.device
 97ms user@1000.service
 95ms systemd-udev-trigger.service
 67ms systemd-journal-flush.service
 46ms systemd-journald.service
 37ms boot.mount
 35ms polkit.service
 33ms systemd-udevd.service
 31ms systemd-sysctl.service
 31ms udisks2.service
 29ms systemd-tmpfiles-setup.service
 27ms systemd-logind.service
 26ms NetworkManager.service
 24ms systemd-timesyncd.service
 21ms cpupower.service
 20ms systemd-tmpfiles-clean.service
 19ms systemd-tmpfiles-setup-dev.service
 15ms systemd-fsck@dev-nvme0n1p3.service
 14ms systemd-fsck@dev-nvme0n1p1.service
 13ms dbus.service
 12ms modprobe@fuse.service
 10ms ntpd.service
 10ms systemd-binfmt.service
  9ms dev-hugepages.mount
  8ms dev-mqueue.mount
  8ms alsa-restore.service

 

I was pretty ok with the boot up speed before this latest round of fiddling. The speed increase is very noticeable and welcome though. For the life of me I can not figure out how I came to have a "fstrim.timer.override" file, I certainly did not install it consciously so some program somewhen must have installed it in the background. But which program and why ???

Just another mystery from the penguin world that will probably remain unsolved. 🤔

Edited by abarbarian
  • Like 1
Link to comment
Share on other sites

securitybreach

Nice, I was down to 3.1 seconds years ago but with LUKS encryption, there is a pause for the decrypt process (using a long password) so it's slowed down a bit

 

qdmmxoh.png

  • +1 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...