ssh to server takes 15 seconds to connect

When I try to ssh to an Ubuntu server, using its numeric ip address, it takes about 15 seconds for the server to reply with a password request. I am connecting from my primary desktop Ubuntu 18.04 machine, the server is Mytbuntu 14.04. Once I connect, I can immediately ssh to any other computer on the system that accepts logins. When I ping the server’s address, the response is instantaneous.

Omni.ja takes to much memory?

recently i noticed my laptop freezes and i cant do anythign unless i force reboot it with power button. This time i saw my memory usage increasing on indicator panel. So i had a look at system monitor and i saw a couple or omni.ja proccess each one taking about 900mb now i see why it keeps freezing. I did a search and found out it’s related to Firefox browser But i did nto find any fix for it. Are there any solution for this this? Than youScreenshot

Pressing SysReq key (alone or with other keys) takes me back to X session

Summary:

When I switch to a tty, if I press SysRq and release, I’m taken back to my X session.

When I try any “Magic SysRq” commands other than Alt + SysRq + space or Alt + SysRq + p, no “magic” happens and I’m just taken back to my X session.

Both Alt + SysRq + space and Alt + SysRq + p print a help/usage message.

Background:

I’m running Ubuntu 18.04, kernel version 4.15.0-58-generic (package version 4.15.0-58.64) on x86_64. My laptop is a Thinkpad 13 (2016 model), and the SysRq key is Fn+S.

I’ve set the kernel sysrq mask to 1 (it was originally the default 176), but that didn’t change the behaviour at all:

$   sysctl kernel.sysrq kernel.sysrq = 176  $   sudo sysctl kernel.sysrq=1 kernel.sysrq = 1  $   sysctl kernel.sysrq kernel.sysrq = 1 

Magic SysRq is enabled in the kernel:

$   grep MAGIC_SYSRQ /boot/config-$  (uname -r) CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x01b6 CONFIG_MAGIC_SYSRQ_SERIAL=y 

What I’ve tried:

If I press and hold Alt + Fn+S and then press Space (while still holding down Alt + Fn+S), I get the SysRq help/usage message:

[  294.516753] sysrq: SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)  

which suggests that Fn+S is indeed acting as SysRq.

If I try any other “Magic SysRq” key combinations, it’s equivalent to if I just press Fn+S by itself – I’m immediately taken back to my X session.

I’ve tried the following keys (as they seem largely harmless):

  • d Shows all locks that are held.
  • l Shows a stack backtrace for all active CPUs.
  • m Will dump current memory info to your console.
  • p Will dump the current registers and flags to your console.
  • t Will dump a list of current tasks and their information to your console.
  • w Dumps tasks that are in uninterruptible (blocked) state.
  • r Turns off keyboard raw mode and sets it to XLATE.

Of those, Alt + SysRrq + p also printed the same help information as Alt + SysRq + Space; the others just took me back to my X session.

systemd-tmpfiles-setup.service takes 59min 24.321s to boot

Extremly short version:

Ubuntu 18.04 takes 1h 6min 17.410s to startup/ boot. It seems that systemd-tmpfiles-setup.service takes 59min 24.321s and apt-daily-upgrade.service 4min 13.257s.

More specifically, when I run a specific bash/python script with a lot of open() and close(), the next time I boot Ubuntu it takes that long.

It seems that when I use $ sudo apt-get update , $ sudo apt-get upgrade , $ sudo apt-get dist-upgrade before I close the computer it takes much shorter time (about 3 min) to boot, almost normal ( by normal I mean around 1 min). Additionally tmp doesn’t seem to take a lot of space, so I didn’t try deleting it.

Is there something else or more targeted I could do?

The checks I did :

$   systemd-analyze  Startup finished in 5.752s (kernel) + 1h 6min 11.657s (userspace) = 1h 6min 17.410s 

and

$   systemd-analyze blame    59min 24.321s systemd-tmpfiles-setup.service     4min 13.257s apt-daily-upgrade.service     1min 55.790s apt-daily.service          22.109s plymouth-quit-wait.service          17.100s systemd-journal-flush.service          14.060s dev-sda5.device           9.434s NetworkManager-wait-online.service           7.650s apparmor.service           7.415s dev-loop16.device           6.926s dev-loop17.device           6.817s plymouth-read-write.service           6.687s dev-loop23.device           6.647s dev-loop6.device           6.572s dev-loop9.device           6.500s networkd-dispatcher.service           6.282s dev-loop21.device           6.210s dev-loop18.device           6.072s dev-loop19.device           6.042s dev-loop22.device           6.008s dev-loop14.device           5.913s dev-loop11.device           5.811s dev-loop8.device           5.236s snapd.service           4.965s dev-loop12.device           4.916s dev-loop7.device           4.848s dev-loop20.device           4.761s dev-loop15.device           4.663s dev-loop10.device           4.643s dev-loop5.device           4.624s dev-loop13.device           4.429s dev-loop2.device           3.962s dev-loop4.device           3.718s systemd-rfkill.service           3.518s NetworkManager.service           3.126s systemd-tmpfiles-clean.service           2.858s systemd-logind.service           2.816s dev-loop3.device           2.524s systemd-udevd.service           2.487s udisks2.service           2.474s thermald.service           2.470s dev-loop1.device           2.325s systemd-sysctl.service           2.124s dev-loop0.device           2.016s snap-core18-1074.mount           1.929s ModemManager.service           1.890s accounts-daemon.service           1.787s snap-core18-1066.mount           1.688s snap-code-13.mount           1.520s snap-gnome\x2d3\x2d28\x2d1804-71.mount           1.336s snap-gnome\x2dcharacters-292.mount           1.235s snap-gnome\x2d3\x2d26\x2d1604-88.mount           1.176s snap-sublime\x2dtext-58.mount           1.110s snap-gnome\x2d3\x2d28\x2d1804-67.mount           1.084s systemd-update-utmp.service           1.075s systemd-modules-load.service           1.052s snap-code-12.mount           1.035s fwupd.service           1.021s systemd-tmpfiles-setup-dev.service           1.013s snap-core-7270.mount            962ms motd-news.service            957ms networking.service            956ms snap-gnome\x2dcalculator-406.mount            951ms snap-sublime\x2dtext-67.mount            877ms snap-gtk\x2dcommon\x2dthemes-1198.mount            849ms gpu-manager.service            829ms grub-common.service            827ms snap-gnome\x2dcharacters-296.mount            810ms snap-gnome\x2dlogs-45.mount            796ms iio-sensor-proxy.service            793ms keyboard-setup.service            760ms snap-gnome\x2dsystem\x2dmonitor-100.mount            746ms packagekit.service            740ms dns-clean.service            722ms plymouth-start.service            717ms wpa_supplicant.service            681ms systemd-backlight@backlight:intel_backlight.service            635ms snap-gimp-165.mount            632ms avahi-daemon.service            620ms swapfile.swap            618ms snap-gnome\x2d3\x2d26\x2d1604-90.mount            542ms snap-gnome\x2dsystem\x2dmonitor-95.mount            541ms console-setup.service            479ms colord.service            454ms ufw.service            445ms polkit.service            439ms systemd-journald.service            424ms systemd-random-seed.service            350ms snap-gimp-189.mount            337ms user@1000.service            334ms snap-gtk\x2dcommon\x2dthemes-1313.mount            321ms snap-gnome\x2dcalculator-260.mount            307ms rsyslog.service            306ms snap-gnome\x2dlogs-61.mount            276ms snapd.seeded.service            224ms sys-kernel-debug.mount            223ms kmod-static-nodes.service            203ms apport.service            195ms snap-core-7396.mount            185ms systemd-remount-fs.service            172ms upower.service            148ms gdm.service             75ms bolt.service             63ms systemd-udev-trigger.service             58ms dev-hugepages.mount             35ms systemd-resolved.service             35ms systemd-timesyncd.service             30ms speech-dispatcher.service             26ms bluetooth.service             24ms alsa-restore.service             16ms setvtrgb.service             12ms kerneloops.service             12ms ureadahead-stop.service              9ms systemd-update-utmp-runlevel.service              8ms pppd-dns.service              7ms dev-mqueue.mount              6ms rtkit-daemon.service              6ms systemd-user-sessions.service              2ms sys-fs-fuse-connections.mount              2ms sys-kernel-config.mount 

and

$   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 @1h 15.288s └─multi-user.target @1h 15.288s   └─snap-gnome\x2dcalculator-260.mount @5.932s +321ms     └─local-fs-pre.target @3.729s       └─systemd-tmpfiles-setup-dev.service @2.707s +1.021s         └─kmod-static-nodes.service @2.482s +223ms           └─systemd-journald.socket @2.480s             └─system.slice @2.480s               └─-.slice @2.451s 

Ubuntu takes ~1:20 to boot

My Ubuntu installation is taking more than a minute to boot… I’ve had this problem for quite some time. I’ve already turned off secure boot (I always get that “PKCS#7 not signed with a trusted key” error). This is the output of systemd-analyze blame:

         16.818s systemd-journal-flush.service          16.519s systemd-udevd.service          16.064s snapd.service          13.623s dev-loop21.device          13.546s dev-loop10.device          13.442s dev-loop22.device          13.252s dev-loop13.device          13.067s dev-loop14.device          13.060s dev-loop23.device          12.996s dev-loop3.device          12.986s dev-loop6.device          12.960s dev-loop18.device          12.954s dev-loop16.device          12.951s dev-loop15.device          12.949s dev-loop12.device          12.882s dev-loop24.device          12.862s dev-loop27.device          12.822s dev-loop17.device          12.413s dev-loop25.device          12.337s ModemManager.service          12.336s dev-loop26.device          12.261s dev-loop9.device          12.116s dev-loop7.device          12.103s networkd-dispatcher.service          12.077s NetworkManager-wait-online.service          11.930s dev-loop20.device          11.809s gpu-manager.service          11.692s dev-loop19.device          11.512s dev-loop11.device          11.393s dev-loop5.device          11.140s dev-loop2.device          11.137s dev-loop0.device          10.934s dev-loop8.device          10.700s dev-loop4.device          10.029s dev-loop1.device           9.770s NetworkManager.service           7.673s grub-common.service           6.692s bluetooth.service           6.331s udisks2.service           6.253s snap-gtk\x2dcommon\x2dthemes-1313.mount           6.207s accounts-daemon.service           5.738s wpa_supplicant.service           5.508s snap-gnome\x2d3\x2d28\x2d1804-63.mount           5.212s systemd-logind.service           5.060s pppd-dns.service           4.827s snap-core18-1049.mount           4.796s snap-pycharm\x2dcommunity-132.mount           4.706s rsyslog.service           4.699s speech-dispatcher.service           4.686s apport.service           4.414s snap-canonical\x2dlivepatch-81.mount           4.347s snap-gnome\x2d3\x2d28\x2d1804-67.mount           3.896s snap-gnome\x2d3\x2d26\x2d1604-88.mount           3.840s tlp.service           3.790s apparmor.service           3.510s snap-gnome\x2dcalculator-352.mount           3.238s snap-google\x2dplay\x2dmusic\x2ddesktop\x2dplayer-70.mount           2.957s snap-gnome\x2dcalculator-260.mount           2.800s networking.service           2.748s snap-core18-1066.mount           2.676s systemd-tmpfiles-setup-dev.service           2.558s thermald.service           2.486s snap-discord-93.mount           2.287s snap-gtk\x2dcommon\x2dthemes-1198.mount           2.242s gdm.service           2.156s apport-autoreport.service           2.125s snap-core-7270.mount           2.119s systemd-backlight@backlight:intel_backlight.service           2.028s setvtrgb.service           2.009s systemd-modules-load.service           1.990s user@121.service           1.972s snap-canonical\x2dlivepatch-77.mount           1.903s keyboard-setup.service           1.853s snap-gnome\x2dlogs-45.mount           1.835s snap-netbeans-6.mount           1.735s systemd-backlight@leds:dell::kbd_backlight.service           1.731s snap-gnome\x2dcharacters-296.mount           1.649s snap-gnome\x2d3\x2d26\x2d1604-90.mount           1.438s systemd-tmpfiles-setup.service           1.434s systemd-random-seed.service           1.314s snap-core-7169.mount           1.103s avahi-daemon.service           1.016s snap-gnome\x2dsystem\x2dmonitor-95.mount            906ms plymouth-read-write.service            898ms snap-netbeans-10.mount            881ms swapfile.swap            864ms snap-gnome\x2dcharacters-292.mount            858ms packagekit.service            843ms snap-pycharm\x2dcommunity-143.mount            759ms snap-gnome\x2dcalculator-406.mount            655ms snap-gnome\x2dlogs-61.mount            587ms snap-gnome\x2dsystem\x2dmonitor-100.mount            586ms sys-kernel-debug.mount            585ms ufw.service            579ms systemd-journald.service            406ms polkit.service            398ms systemd-resolved.service            370ms systemd-fsck@dev-disk-by\x2duuid-6030\x2d6C29.service            363ms systemd-timesyncd.service            265ms snapd.socket            218ms snap-gnome\x2dlogs-57.mount            214ms systemd-hostnamed.service            180ms systemd-remount-fs.service            174ms systemd-sysctl.service            173ms kmod-static-nodes.service            150ms systemd-update-utmp.service            146ms upower.service            115ms bolt.service            104ms user@1000.service             87ms nvidia-persistenced.service             73ms dev-hugepages.mount             70ms dev-mqueue.mount             69ms colord.service             51ms systemd-udev-trigger.service             39ms snapd.seeded.service             37ms rtkit-daemon.service             10ms alsa-restore.service              6ms kerneloops.service              5ms boot-efi.mount              4ms dns-clean.service              3ms systemd-update-utmp-runlevel.service              3ms ureadahead-stop.service              3ms sys-fs-fuse-connections.mount              3ms sys-kernel-config.mount              2ms systemd-user-sessions.service              2ms console-setup.service              1ms plymouth-quit-wait.service 

And this is the output of dmesg. As you can see, there are some errors, including multiple PKCS errors.

I was also asked for the output of systemd-analyze critical chain, so here it is: https://pastebin.com/VBtjjThw.

If an Animated Object is given a task that takes longer than a minute to do, does the object stay animated longer than a minute?

So I am looking at the description of the 5th level spell Animate Objects, it says that its duration is up to a minute, however it also says that, “once given an order, the creature continues to follow it until its task is complete”. If the task lasts longer than a minute, does it continue to stay animated?

Operation takes very long, then all variables are cleared

I am trying to simplify a very large expression and to accomplish that I’m running the following lines of code:

Parallelize[SimpExpression = Simplify[Expression];] Compress[SimpExpression] 

The Compress[SimpExpression] line is simply there to generate an output that I can save later. After running for several hours ($ \sim12$ ) I get the following output:

Simplify: Time spent on a transformation exceeded 300.` seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.  Simplify: Time spent on a transformation exceeded 300.` seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.  Simplify: Time spent on a transformation exceeded 300.` seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.  General: Further output of Simplify::time will be suppressed during this calculation. 

Moreover, as a result, all the variables have been cleared. Any ideas about what is happening or how I could solve this?

I am not sure this is relevant, but I am using a trial version of Mathematica. Also, I can provide Expression if someone wants to replicate this.

Error “TypeError: Serial() takes no arguments” en Python (pySerial, Raspbian)

estoy intentando leer los bytes que entran mediante un usb (el cable que está enchufado en el usb es un conversor usb-serial232).

Yo no se mucho de python,y he estado buscando ayuda por internet hasta que me he encontrado con el siguiente código:

import serial ser = serial.Serial('/dev/ttyUSB0', 9600)  while True:     data = ser.readline()     if data:         print(data) 

Cuando ví esto me dio buenas vibraciones, ya que la forma que tengo de leer el mbus es con una librería de Linux que utiliza el ttyISB0.

La 1era vez que lo ejecuté me pedía que instalase la librería ‘serial’. Como estoy trabajando con PyCharm, con hacer Ctrl-Mayus-Intro se me instalaba sola.

Una vez instalé serial, me dio el error de ‘Serial’ (S mayúscula). Total, que lo instalé también.

Pero me sigue dando el siguiente error:

/root/PycharmProjects/prueba1/venv/bin/python /root/PycharmProjects/prueba1/file1.py Traceback (most recent call last):   File "/root/PycharmProjects/prueba1/file1.py", line 2, in <module>     ser = serial.Serial('/dev/ttyUSB0', 9600) TypeError: Serial() takes no arguments  Process finished with exit code 1 

Y ya no se que hacer, he estado mirando en internet, pero no hay nada sobre ese error.

Toda ayuda será bien recibida. Un Saludo