Bash while loop stop after a successful curl request Posted: 09 Apr 2021 10:28 AM PDT I'm currently learning how to write bash scripts. How do I stop while loop once I get a 200 response code on my curl request? aws --endpoint-url http://s3.sample.com/ s3 cp hello.php s3://bucket/ while [ true ] do curl http://sample.com/hello.php &> /dev/null done |
What is the best way to pipe the output of Grep -Ri to file? Posted: 09 Apr 2021 10:14 AM PDT Grep -Ri can be piped to a file directly. The problem with this is that the the log name is not clear as it is hidden to the left of the timestamp in the same font color. Would it be possible to improve this. Like to color each .log entry on the left a different color, to color only the timestamp aspect, or to put the name of the log only once at the top of each file grep -Ri outputs. If grep -Ri can't be used for this, what are the best alternatives and options. grep -Ri "2021-04-06T05:2" > log; cat log | grep -vi info | less This works nicely. Im trying to figure out how to refine the above output is all. |
Can't play CD on fedora: no medium found on /dev/sr0 Posted: 09 Apr 2021 10:06 AM PDT When I insert a DVD into the drive on my PC under Fedora 33, vlc opens the disk automatically and begins to play it. When I insert a CD (audio or data), the drive spins up and the light blinks, but the disk fails to automount. The disk doesn't appear in Rhythmbox or Files. When I try to mount with mount /dev/sr0 /tmp , I get mount: /tmp: no medium found on /dev/sr0 . I can successfully eject the drive. I have installed all the recommended gstreamer plugins and can see no obvious errors in the following commands $ lsblk $ lspci $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' $ cdrecord -prcap dev=/dev/cdrom $ ls -l /dev/sr0 The audio CDs play fine in another dvd drive on my ancient laptop. I've recently upgraded from Fedora 32 so all the libraries are up to date. As far as I can recall, I've never bothered playing CDs from this machine. It's been a long time since I've had to deal with CD/DVD issues, so there could be something in the last 5-10 years that I haven't kept up with. I'm still coming up to speed with systemd. ;) The only errors I can spot are from journalctl /dev/sr0 Apr 09 11:57:52 corvus kernel: ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 5 ports 6 Gbps 0x5 impl SATA mode kernel: ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part ems apst kernel: scsi host2: ahci kernel: scsi 2:0:0:0: CD-ROM hp DVD-RAM UJ8E1 4H01 PQ: 0 ANSI: 5 kernel: sr 2:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray kernel: sr 2:0:0:0: Attached scsi CD-ROM sr0 kernel: sr 2:0:0:0: Attached scsi generic sg1 type 5 kernel: sr 2:0:0:0: [sr0] tag#23 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s kernel: sr 2:0:0:0: [sr0] tag#23 Sense Key : Not Ready [current] kernel: sr 2:0:0:0: [sr0] tag#23 Add. Sense: Incompatible medium installed kernel: sr 2:0:0:0: [sr0] tag#23 CDB: Read(10) 28 00 00 00 00 00 00 00 02 00 # wodim --devices wodim: Overview of accessible drives (1 found) : ------------------------------------------------------------------------- 0 dev='/dev/sr0' rwrw-- : 'hp' 'DVD-RAM UJ8E1' ------------------------------------------------------------------------- The output of cd-info cd-info version 2.1.0 x86_64-redhat-linux-gnu CD location : /dev/cdrom CD driver name: GNU/Linux access mode: IOCTL Vendor : hp Model : DVD-RAM UJ8E1 Revision : 4H01 Hardware : CD-ROM or DVD Can eject : Yes Can close tray : Yes Can disable manual eject : Yes Can select juke-box disc : No Can set drive speed : No Can read multiple sessions (e.g. PhotoCD) : Yes Can hard reset device : Yes Reading.... Can read Mode 2 Form 1 : Yes Can read Mode 2 Form 2 : Yes Can read (S)VCD (i.e. Mode 2 Form 1/2) : Yes Can read C2 Errors : Yes Can read IRSC : Yes Can read Media Channel Number (or UPC) : Yes Can play audio : Yes Can read CD-DA : Yes Can read CD-R : Yes Can read CD-RW : Yes Can read DVD-ROM : Yes Writing.... Can write CD-RW : Yes Can write DVD-R : Yes Can write DVD-RAM : Yes Can write DVD-RW : No Can write DVD+RW : No __________________________________ Disc mode is listed as: Error in getting information ++ WARN: error in ioctl CDROMREADTOCHDR: No medium found cd-info: Can't get first track number. I give up. The OS is GNU/Linux 5.11.11-200.fc33.x86_64. Where should I look next and what issues should I be thinking of? |
csh up arrow for previous matching command Posted: 09 Apr 2021 09:58 AM PDT How can i configure .cshrc file to use Shift+UpArrow go through history backward search? Also, how can i configure searching cmds with same prefix? I have tried looking through .cshrc file but doesn't know what to update. |
laptop fan does not turn back on when exiting sleep mode Posted: 09 Apr 2021 09:49 AM PDT I am using: After restarting my computer, my laptop fan works normally. But, once I close the lid to put the laptop to sleep, the fan will not turn on after waking up (until the next restart) Sometimes the fan will turn on briefly (<1 sec) when entering/exiting sleep mode, but that's it. I specifically remember the fan working properly in the past, and I think this issue only started a few months ago. |
Runing alias or function in background Posted: 09 Apr 2021 09:49 AM PDT I am connecting to an OpenVPN server from my Linux Mint 19.1 machine. As the Network manager is not setting up routes properly is one uses the GUI to connect I connect by executing: sudo openvpn --config <config-file.ovpn> & To make things easier I have stored all my VPN settings in a hidden folder using a specific tree structure. I wanted to define an alias or a function that executes the above command with a particular VPN setting, that I can call from anywhere. I've added the following to my .bashrc alias OpenVPN='read -p "VPN name: " VPN_NAME my_path=~/.openvpn.confs/${VPN_NAME}/OpenVPN VPN_CONF=${my_path}/vpnconfig.ovpn sudo openvpn --config $VPN_CONF' This works well but I have to keep the terminal open as it runs in interactive mode. I wanted to have it spin up and run in the background so I added a "&" to the last command, which works fine if I call that command manually from the terminal. sudo openvpn --config $VPN_CONF & But when I add it to the alias, the system still thinks it is running continuously in the background, but the connection does not work. I also tried running it as a function, which does not connect either. OVPN() { sudo openvpn ~/.openvpn.confs/"$@"/OpenVPN/vpnconfig.ovpn & } Any suggestions for how this might be solved? |
Using Ansible to fetch or copy zip files from a remote server to the current server results in "file not found: /tmp/data/*.zip" Posted: 09 Apr 2021 10:02 AM PDT In Ansible, I want to fetch or copy zip files from remote server-B to currently logged remote server-A (both are Linux hosts). - hosts: server-A become: yes tasks: - name: copy the zip files fetch: src: /tmp/data/*.zip dest: /tmp/app/ flat: yes register: zip_status delegate_to: server-B Below is the error I get; I tried with copy/synchronize module as well, it's not working. fatal: [server-B -> 10.98.68.222]: FAILED! => { "changed": false, "invocation": { "module_args": { "src": "/tmp/data/*.zip" } "msg": "file not found: /tmp/data/*.zip" |
How do I SSH to machine A via B without freezing? Posted: 09 Apr 2021 09:47 AM PDT I want to access a computer, say machine A. However, this computer is only accessible via private network. I have access to machine B and it has access to machine A. I can connect by ssh to A by B only for 30 seconds before the terminal freeze. How do I have a longer connection? ssh -t -o KeepAlive=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=1000 userB@machineB ssh -t -o KeepAlive=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=1000 -o StrictHostKeyChecking=no userA@machineA I cannot change configuration files in machine B and Proxy do not work. |
Debian 10 KDE - Can't connect to WiFi Posted: 09 Apr 2021 09:45 AM PDT nmcli general status and nmcli connection show and nmcli device status all give me a reasonable output, but nmcli dev wifi list does nothing. What am I doing wrong? I am using an intel PCI WiFi-card, so I apparently need the package iwlwifi-7260-ucode-25.30.14.0, which I downloaded and extracted. But what do I do with that? The README told me to copy a file called iwlwifi-7260-14.ucode into the /lib/firmware directory, but it did nothing. Restart didn't change anything of the before mentioned. |
How to compile Linux Kernel 0.95 and run it with QEMU? Posted: 09 Apr 2021 09:39 AM PDT I want to compile Linux Kernel 0.95 and run it with QEMU. But I just found this (Linux Kernel 0.95 source code). |
Darkice not dying when audio device goes away Posted: 09 Apr 2021 09:36 AM PDT I have darkice that is transmitting a stream to an icecast server. Icecast is started by systemd. When the USB device is disconnected I see in the logs Apr 09 12:24:32 scanner1 darkice[3803072]: DarkIce: AlsaDspSource.cpp:265: No such device [0] Which I would expect since the device was removed. When this happens icecast does not die but simply hangs. This is on a CentOS system. I ideally would like for darkice to die so that systemd could see that and then restart darkice. |
Rescuedisk to access kali grub Posted: 09 Apr 2021 09:36 AM PDT What rescue disk should I use to access kali grub? I already tried the actual Kali iso and it was stuck at intrid:/ . Also after making the bootable disk how do I enter grub and run commands? |
Buffer overrun with Darkice Posted: 09 Apr 2021 09:30 AM PDT I have two USB audio devices connected to a USB hub that then connects to a PC. The USB hub has external power. I am using darkice to transmit a stream to an icecast server. Every so often I get in the logs: Apr 09 12:24:27 scanner1 darkice[3803072]: AlsaDspSource :: Buffer overrun! Apr 09 12:24:28 scanner1 darkice[3803072]: AlsaDspSource :: Buffer overrun! Apr 09 12:24:29 scanner1 darkice[3803072]: AlsaDspSource :: Buffer overrun! Apr 09 12:24:30 scanner1 darkice[3803072]: AlsaDspSource :: Buffer overrun! If I kill darkice and restart it, it wont help. The only way to fix the issue is to remove the USB device and then connect it a few minutes later. Sometimes the issue happens after a few minutes and sometimes after a few days. What would cause this? Is this a USB issue or strictly something with darkice? |
which files were removed from /tmp upon reboot Posted: 09 Apr 2021 10:13 AM PDT Hoping against hope here, but is there some in-built logging mechanism through which I can find out which files were deleted from /tmp upon reboot? I could obviously tweak the shutdown scripts, but that's not what I'm asking. |
libssh2 filtered out by modular filtering on RHEL 8 Posted: 09 Apr 2021 09:27 AM PDT The libssh2 1.9 can't be installed from EPEL repository on RHEL 8.1 and newer (tested on RHEL 8.3): # dnf --enablerepo=epel install libssh2-1.9.0 ... All matches were filtered out by modular filtering for argument: libssh2-1.9.0 Error: Unable to find a match: libssh2-1.9.0 Other EPEL RPMs can be installed without any obstacles. How can I install the libssh2 without downloading it and installing localy? |
How to run umbrel from a raspberrypi installation Posted: 09 Apr 2021 09:10 AM PDT I tried: 1-from terminal right-click at umbrel image. At Terminal- pi@raspberrypi:/media/pi/umbrel $ and Typing umbrel: -response-Bash:umbrel: command not found 2- right click image -open, right click bin or boot folder open terminal. At terminal-pi@raspberrypi:/bin or /boot $ after typing umbrel , response- Bash: command not found Anything I have missed to do? |
Can't access grub to restore sudo [duplicate] Posted: 09 Apr 2021 08:59 AM PDT I mistakenly ran a command that made sudo no longer a set-uid binary and it's no longer owned by root and now I can use it at all. I want to go into grub to correct this but I can't access grub because my grub timeout is 0 and I can't change the grub config file because it requires root permission (sudo) to write to the file. Any ideas on solutions for any of these problems please? sudo chown -R adstefnum /usr That's the command I ran. |
Debian 10 KDE - Bluetooth mouse keeps disconnecting Posted: 09 Apr 2021 08:58 AM PDT I was happy to have my Bluetooth mouse connected after several hours of searching the right commands, but now it just disconnects. Sometimes after mimutes, sometimes after an hour and keeps disconnected, whatever I press or do with it. Any suggestion? |
PROBLEM with dnsmasq Posted: 09 Apr 2021 08:55 AM PDT Hi there I'm having problems with this command... I made the dnsmasq.conf file this way: interface=wlan0mon dhcp-range= 192.168.1.2, 192.168.1.30, 255.255.255.0, 12h dhcp-option=3, 192.168.1.1 dhcp-option=6, 192.168.1.1 server= 8.8.8.8 log-queries log-dhcp listen-address= 127.0.0.1 when I hit the command sudo dnsmasq -C dnsmasq.conf -d I get this: dnsmasq: started, version 2.84rc2 cachesize 150 dnsmasq: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile dnsmasq-dhcp: DHCP, IP range 192.168.1.2 -- 192.168.1.30, lease time 12h dnsmasq: using nameserver 8.8.8.8#53 dnsmasq: no servers found in /etc/resolv.conf, will retry dnsmasq: read /etc/hosts - 6 addresses My resolv.conf file contain this: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "resolvectl status" to see details about the actual nameservers. namserver 192.168.1.1 namserver fe::d635:1dff:fe1e:463f%wlan0 search homenet.telecomitalia.it |
Find pattern on multiple lines within BIG log files Posted: 09 Apr 2021 09:34 AM PDT To investigate within logs, I am trying to find the very first time a vulnerability in a workflow has been exploited. The pattern is on multiple lines. The pattern would be AAAAAAAAA BBBBBBBBB CCCCCCCCC The problem is that AAAAAAAAA or BBBBBBBBB or CCCCCCCCC Can be found anywhere indivdually in the log without showing the vulnerability; it is the exact pattern in this exact order that will help me. For example grep -Ei "AAAAAAAAA|BBBBBBBBB|CCCCCCCCC" logfile does not help me since all the lines with individual occurence of AAAAAAAAA BBBBBBBBB CCCCCCCCC will be there. How can I solve this? |
Creating files in shell script Posted: 09 Apr 2021 09:56 AM PDT I want to create a shell script that contains a variable with a path on which path we need to create empty .txt files. I try with: ** path=directory part touch Test{1..100}.txt ** but this 100 files was create in directory which the script is. Can you help me to solve this problem? |
python script doesn't appear to be executed but no errors show Posted: 09 Apr 2021 09:07 AM PDT I have a python script that I would like to run through cron every minute * * * * * /usr/bin/python3 /home/analytics/Documents/devDeliverables/attendanceReadTsv/check_raw.py when I run this using a non-root terminal, it runs alright. It raises an access denied error but that's still fine. when I run this using a root terminal, it executes all the way through. I'm checking /var/log/cron and it does not show any errors whatsoever. Also with /var/log/messages, I don't see any errors with the python call. What the python script does is it converts tsv to xlsx, and it deletes the raw files. But it does not delete the file. |
How to undelete a file on a btrfs filesystem Posted: 09 Apr 2021 09:30 AM PDT Which software and commands are required, to undelete a file on a btrfs filesystem? |
Limit SSH access to specific clients by IP address Posted: 09 Apr 2021 09:18 AM PDT How do we allow certain set of Private IPs to enter through SSH login(RSA key pair) into Linux Server? |
Encrypting home directory on Raspberry pi with password file on USB Posted: 09 Apr 2021 10:07 AM PDT I have been trying to follow this guide: https://www.howtoforge.com/tutorial/how-to-encrypt-directories-and-partitions-with-ecryptfs-on-debian/ to encrypt the home directory on my pi with out a password by saving the password on a file onto a usb. But the issue is that the pi boots up to a login screen and prompts for a password. The only difference to the configuration in the guide I have made is that my usb is ntfs and the name of the directory that is being encrypted (pi) and the password. I tried it again and afterwards when the pi booted up it said root account was locked and I only had command line access to the system. Are there any passwordless encryption alternatives that I can use? As the pi will have a display but no keyboard. |
mount: no medium found on /dev/sr0 Posted: 09 Apr 2021 09:18 AM PDT According this instruction I tried to mount DVD disk into Fedora 24 What I did. [root@mic3ael mic3ael]# wodim --devices wodim: Overview of accessible drives (1 found) : ------------------------------------------------------------------------- 0 dev='/dev/sr0' rwrw-- : 'HL-DT-ST' 'DVDRAM GUC0N' ------------------------------------------------------------------------- According to output, I understood that /dev/sr0 should be mounted [root@mic3ael mic3ael]# mount -t iso9660 /dev/sr0 /media/cdrom mount: /dev/sr0 is write-protected, mounting read-only mount: no medium found on /dev/sr0 but the DVD didn't mount. The question is what does it mean mount: no medium found on /dev/sr0 and how to mount DVD disk into Fedora 24. Thanks, Michael. |
Delaying kernel upgrades on Arch Linux Posted: 09 Apr 2021 10:27 AM PDT On Arch Linux, whenever a kernel upgrade is applied (via pacman -Su ), problems occur. For example, iptables can no longer be used: # iptables -L iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. VMWare can't find the kernel headers: Now, I want to have kernel upgrades applied, but I'd like to defer them until I can (or want to) restart the system (remind anyone of Windows?). Otherwise, if my work is blocked on iptables or VMWare or some other program, I have no choice but to restart and rebuild a session. How can I do that? Ideally I'd like to continue using pacman -Su , but have certain upgrades deferred. I believe Is it normal that a restart is required to mount USB after a kernel upgrade? is caused by the same problem. |
"Memory corruption detected in low memory" kernel messages? Posted: 09 Apr 2021 10:03 AM PDT I have some memory corruption detected in low memory messages. I have read about it here, but I'm afraid I can't really make anything out of the discussion. It does indeed happen when I suspend/resume, but unlike others who had similar problems, I do not have a broadcom wifi card. This is all marvell ethernet and no wifi. This is a desktop tower with: Linux gentoomyuser3x86_64 3.10.25-gentoo #1 SMP 2014 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux Here is the log output: [12960.735034] Corrupted low memory at ffff88000000fff0 (fff0 phys) = 40000000000000 [12960.735035] Corrupted low memory at ffff88000000fff8 (fff8 phys) = 250c60840020 [12960.735036] ------------[ cut here ]------------ [12960.735042] WARNING: at arch/x86/kernel/check.c:140 check_for_bios_corruption+0x10f/0x120() [12960.735043] Memory corruption detected in low memory [12960.735056] Modules linked in: nouveau cfbfillrect cfbimgblt video mxm_wmi wmi cfbcopyarea ttm fbcon bitblit softcursor font tileblit drm_kms_helper backlight fb fbdev fuse [12960.735060] CPU: 0 PID: 9096 Comm: kworker/0:1 Not tainted 3.10.25-gentoo #1 [12960.735061] Hardware name: System manufacturer Maximus Formula/Maximus Formula, BIOS 1403 09/10/2009 [12960.735064] Workqueue: events check_corruption [12960.735068] 0000000000000009 ffff8801165fdcf8 ffffffff8157431b ffff8801165fdd38 [12960.735070] ffffffff81045e9b 0000000000000000 0000000000000000 ffff880000010000 [12960.735073] ffffffff819b20b0 0000000000000001 ffff880000000000 ffff8801165fdd98 [12960.735074] Call Trace: [12960.735079] [<ffffffff8157431b>] dump_stack+0x19/0x1b [12960.735082] [<ffffffff81045e9b>] warn_slowpath_common+0x6b/0xa0 [12960.735085] [<ffffffff81045f71>] warn_slowpath_fmt+0x41/0x50 [12960.735087] [<ffffffff8102bc2f>] check_for_bios_corruption+0x10f/0x120 [12960.735090] [<ffffffff8102bc49>] check_corruption+0x9/0x40 [12960.735094] [<ffffffff81061f8f>] process_one_work+0x17f/0x420 [12960.735096] [<ffffffff81062679>] worker_thread+0x119/0x370 [12960.735099] [<ffffffff81062560>] ? rescuer_thread+0x2f0/0x2f0 [12960.735102] [<ffffffff81068c4b>] kthread+0xbb/0xc0 [12960.735105] [<ffffffff81068b90>] ? kthread_create_on_node+0x120/0x120 [12960.735109] [<ffffffff815819ac>] ret_from_fork+0x7c/0xb0 [12960.735111] [<ffffffff81068b90>] ? kthread_create_on_node+0x120/0x120 [12960.735113] ---[ end trace a3687665afd39e38 ]--- And verbose lspci -v and some lshw output to better understand my setup, if required: 00:00.0 Host bridge: Intel Corporation 82X38/X48 Express DRAM Controller (rev 01) Subsystem: ASUSTeK Computer Inc. Device 8295 Flags: bus master, fast devsel, latency 0 Capabilities: [e0] Vendor Specific Information: Len=0c <?> 00:06.0 PCI bridge: Intel Corporation 82X38/X48 Express Host-Secondary PCI Express Bridge (rev 01) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 I/O behind bridge: 0000d000-0000dfff Memory behind bridge: fd000000-feafffff Prefetchable memory behind bridge: 00000000f0000000-00000000f9ffffff Capabilities: [88] Subsystem: Intel Corporation Device 0000 Capabilities: [80] Power Management version 3 Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [a0] Express Root Port (Slot+), MSI 00 Capabilities: [100] Virtual Channel Capabilities: [140] Root Complex Link Kernel driver in use: pcieport 00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 16 I/O ports at c800 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 21 I/O ports at c880 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 18 I/O ports at cc00 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) (prog-if 20 [EHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 18 Memory at fcfffc00 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 2 Capabilities: [58] Debug port: BAR=1 offset=00a0 Capabilities: [98] PCI Advanced Features Kernel driver in use: ehci-pci 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) Subsystem: ASUSTeK Computer Inc. Device 8277 Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at fcff8000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [130] Root Complex Link Kernel driver in use: snd_hda_intel 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=03, subordinate=03, sec-latency=0 I/O behind bridge: 00001000-00001fff Memory behind bridge: fa000000-fa3fffff Prefetchable memory behind bridge: 00000000fbf00000-00000000fbffffff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Capabilities: [a0] Power Management version 2 Capabilities: [100] Virtual Channel Capabilities: [180] Root Complex Link Kernel driver in use: pcieport 00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 02) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=02, subordinate=02, sec-latency=0 I/O behind bridge: 0000e000-0000efff Memory behind bridge: feb00000-febfffff Prefetchable memory behind bridge: 00000000fa400000-00000000fa5fffff Capabilities: [40] Express Root Port (Slot+), MSI 00 Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8277 Capabilities: [a0] Power Management version 2 Capabilities: [100] Virtual Channel Capabilities: [180] Root Complex Link Kernel driver in use: pcieport 00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 23 I/O ports at c080 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 19 I/O ports at c400 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) (prog-if 00 [UHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 18 I/O ports at c480 [size=32] Capabilities: [50] PCI Advanced Features Kernel driver in use: uhci_hcd 00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) (prog-if 20 [EHCI]) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0, IRQ 23 Memory at fcfff800 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 2 Capabilities: [58] Debug port: BAR=1 offset=00a0 Capabilities: [98] PCI Advanced Features Kernel driver in use: ehci-pci 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) (prog-if 01 [Subtractive decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=04, subordinate=04, sec-latency=32 Capabilities: [50] Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard 00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: bus master, medium devsel, latency 0 Capabilities: [e0] Vendor Specific Information: Len=0c <?> 00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02) (prog-if 01 [AHCI 1.0]) Subsystem: ASUSTeK Computer Inc. Device 8277 Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 43 I/O ports at bc00 [size=8] I/O ports at b880 [size=4] I/O ports at b800 [size=8] I/O ports at b480 [size=4] I/O ports at b400 [size=32] Memory at fcffe800 (32-bit, non-prefetchable) [size=2K] Capabilities: [80] MSI: Enable+ Count=1/16 Maskable- 64bit- Capabilities: [70] Power Management version 3 Capabilities: [a8] SATA HBA v1.0 Capabilities: [b0] PCI Advanced Features Kernel driver in use: ahci 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02) Subsystem: ASUSTeK Computer Inc. P5K PRO Motherboard Flags: medium devsel, IRQ 18 Memory at fcfff400 (64-bit, non-prefetchable) [size=256] I/O ports at 0400 [size=32] 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1) (prog-if 00 [VGA controller]) Subsystem: Gigabyte Technology Co., Ltd Device 3546 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at fd000000 (32-bit, non-prefetchable) [size=16M] Memory at f0000000 (64-bit, prefetchable) [size=128M] Memory at f8000000 (64-bit, prefetchable) [size=32M] I/O ports at dc00 [size=128] Expansion ROM at fea00000 [disabled] [size=512K] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Endpoint, MSI 00 Capabilities: [b4] Vendor Specific Information: Len=14 <?> Capabilities: [100] Virtual Channel Capabilities: [128] Power Budgeting <?> Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?> Kernel driver in use: nouveau Kernel modules: nouveau 01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1) Subsystem: Gigabyte Technology Co., Ltd Device 3546 Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at feafc000 (32-bit, non-prefetchable) [size=16K] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Endpoint, MSI 00 Kernel driver in use: snd_hda_intel 02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12) Subsystem: ASUSTeK Computer Inc. Motherboard Flags: bus master, fast devsel, latency 0, IRQ 44 Memory at febfc000 (64-bit, non-prefetchable) [size=16K] I/O ports at e800 [size=256] Expansion ROM at febc0000 [disabled] [size=128K] Capabilities: [48] Power Management version 3 Capabilities: [50] Vital Product Data Capabilities: [5c] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [e0] Express Legacy Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Kernel driver in use: sky2 lshw gentoomyuser3x86_64 description: Desktop Computer product: Maximus Formula (To Be Filled By O.E.M.) vendor: System manufacturer version: System Version serial: System Serial Number width: 64 bits capabilities: smbios-2.4 dmi-2.4 configuration: boot=normal chassis=desktop family=To Be Filled By O.E.M. sku=To Be Filled By O.E.M. uuid=00020003-0004-0005-0006-000700080009 *-core description: Motherboard product: Maximus Formula vendor: ASUSTeK Computer INC. physical id: 0 version: Rev 1.xx serial: MB-1234567890 slot: To Be Filled By O.E.M. *-firmware description: BIOS vendor: American Megatrends Inc. physical id: 0 version: 1403 date: 09/10/2009 size: 64KiB capacity: 1984KiB capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification *-cpu description: CPU product: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz vendor: Intel Corp. physical id: 4 bus info: cpu@0 version: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz serial: To Be Filled By O.E.M. slot: LGA775 size: 2394MHz capacity: 3800MHz width: 64 bits clock: 266MHz capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority cpufreq *-cache:0 description: L1 cache physical id: 5 slot: L1-Cache size: 128KiB capacity: 128KiB capabilities: internal write-back data *-cache:1 description: L2 cache physical id: 6 slot: L2-Cache size: 8MiB capacity: 8MiB capabilities: internal write-back instruction This is Gentoo but on Arch, I can find this. There is mention somewhere of a powerdown package on Arch which allows "graceful" suspend/resume. I suspend with: echo -n "mem" > /sys/power/state So should I worry about anything and is there anything wrong with the way I suspend my system? As suggested, I have run one full pass with memtest86+ (15mins, 12 tests I think) and no errors came out. This is 2x2gb Corsair. This rig is burnt in and very stable. I have compiled over 1000 Gentoo packages on this. Further testing After a community member identified a kernel patch which had been deployed to solve exactly this error(Revert "epoll: use freezable blocking call"), I tried to apply the patch to my sources. It turns out I already have the patch installed!? I also installed the suspend package which contains s2ram etc. This utility seemingly does nothing different in the way it suspends the computer. I compared logs of suspend and wake up events from using s2ram and then from using the command I use and there is no difference. I conclude that in that respect there is nothing wrong in using echo -n "mem" > /sys/power/state . I also validated with ethtool that wake on lan is disabled (supports wake on: pg / wake on: d) so it should not interfere with power events if I understand correctly. Maybe a setting in the bios? Or that bios is no longer updated and will trigger that exception and we'll have to live with that. |
Setting default username and group for files in directory Posted: 09 Apr 2021 09:00 AM PDT Using this helpful post I am able to set a default group and file permissions in a folder. I'm having trouble setting a default owner (teamlead uid 1234). setfacl -d -m g::rwx /my/test/folder setfacl -d -m o::rx /my/test/folder getfacl /my/test/folder # file: /my/test/folder # owner: teamlead # group: web_prod # flags: -s- user::rwx group::r-x other::r-x default:user::rwx default:group::rwx default:other::r-x With that: [mary@boxen]# touch /my/test/folder/somefile [mary@boxen]# ll /my/test/folder/somefile -rw-rw-r--. 1 mary web_prod 0 Nov 6 08:58 somefile So the right group is assigned, but the new file has ownership of the user creating the file. I'd like newly created files to have teamlead:web_prod owner/group. It appears that setfacl can be used to set a default user, too. With the existing folder acl config (above): [mary@boxen]# setfacl -d -m u:1234:rwx /my/test/folder Now to create a file as a different user. I'm expecting it to have teamlead:web_prod ownership. [mary@boxen]# touch /my/test/folder/anotherfile [mary@boxen]# ll /my/test/folder/anotherfile -rw-rw-r--+ 1 mary web_prod 0 Nov 6 08:58 somefile New file still has ownership of the owner creating the file, not uid 1234(teamlead). Is what I'm after even possible, or is the way I'm going about this wrong? |
How to run the terminal using keyboard shortcuts in Gnome 2? Posted: 09 Apr 2021 09:45 AM PDT I'm using Gnome 2. I use the terminal several times, and I lose a lot of time going in Applications / Utilities / Terminal to launch the terminal. I am wondering if I can launch the terminal using keyboard shortcuts. I would like to do something similar to CTRL+T. |
No comments:
Post a Comment