Need advice executing awk commands resulting from output of Ansible ad-hoc command Posted: 19 Nov 2021 11:58 AM PST Good day. When I execute the following command to find index IDs by using an Ansible ad-hoc command: $ ansible oamvip -i /storage/inventory/None/${myvnf}hosts --become -m shell -a "/usr/sbin/aladmin list | grep "PartitionUsage" | awk '{ print \$2 }'" xxx.xx.xxx.xxx | CHANGED | rc=0 >> 4818b4715eb6542838023 e520bec15eb6542838023 However, when I try to execute a shell command (sh) on the results from the awk output, ansible shows me the help menu: $ ansible oamvip -i /storage/inventory/None/${myvnf}hosts --become -m shell -a "/usr/sbin/aladmin list | grep "PartitionUsage" | awk '{ print "aladmin show " \$2 | "sh"}'" Usage: ansible <host-pattern> [options] I've tried single and double quotes, backslashes, to no avail. Please advise. Regards, Bjoern |
sed printing titles Posted: 19 Nov 2021 11:32 AM PST I am trying to make sed script that takes numbered titles and writes them in tree structure without the numbers: This is the input: 1. Text1 1.1 Text2 1.1.1 Text3 1.1.1.1 Text4 1.1.1.1.1 Text5 2. Text6 2.1 Text7 And this would be the desired output with . representing spaces: Text1 .Text2 ..Text3 ...Text4 ....Text5 Text6 .Text7 |
Trying to fit a complicated bash string into a mqtt message Posted: 19 Nov 2021 11:15 AM PST I am trying to fit the output of the following string (that is a simple number) df -hl | grep '/dev/mapper/4tb' | awk '{;percent+=$5;} END{print percent}' | column -t into the following mqtt message mosquitto_pub -h 192.168.1.1 -p 1883 -u user -P password -t disk_usage/4tb -m *[here sould go the output of the previous command]* I have tried the following script and many many of its variants (different quotes and parentesis, etc.) but I still cannot figure it out. #!/bin/sh var1='{df -hl | grep '/dev/mapper/4tb' | awk '{;percent+=$5;} END{print percent}' | column -t}' echo $var1 mosquitto_pub -h 192.168.1.65 -p 1883 -u mqtt -P mqtt_password -t GC01SRVR/disk_usage -m "{\"Content\": $var1}" |
How can I find out which device or resource is busy? Posted: 19 Nov 2021 10:24 AM PST I'm looking for advice troubleshooting an issue related to 'cgroups' on Ubuntu 18.04. An application (Mullvad) gives the following error in journalctl : [mullvad_daemon][ERROR] Error: Unable to initialize daemon Caused by: Unable to initialize split tunneling Caused by: Unable to initialize net_cls cgroup instance Caused by: EBUSY: Device or resource busy I want to figure out exactly why the net_cls cgroup could not be initialized. The biggest clue is the next line, EBUSY: Device or resource busy . Is there any way of determining which device or resource this refers to? The information obviously exists -- the system must know which device or resource it was trying to access. Am I allowed to know what it is? This is substantially the same question as this one, which has been ignored for the better part of two years. Perhaps a fresher question with a different context will help. |
file system check error during start my centos 6 machine in virtual machine Posted: 19 Nov 2021 10:17 AM PST i am unable to recover from maintenance mode, can anyone describe the solution? attached screenshots for reference. |
Ubuntu 20.04 Not Detecting Both Monitors and Display Options Posted: 19 Nov 2021 11:10 AM PST I was using two monitors on my ubuntu 20.04 machine. After a poweroff, the system is not recognizing two monitors anymore. I did a sudo update-grub but it just made the ubuntu to startup on the other monitor. This is the output of xrand -q command and it is not detecting anything and any ports: xrandr: Failed to get size of gamma for output default Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768 default connected primary 1024x768+0+0 0mm x 0mm 1024x768 76.00* I know there are some solutions for similar problems but they don't work for me. Also, the resolution on a single monitor is unfit. This is a picture of the Display Settings. How can I fix it? |
systemd unit how to clear OnFailure setting Posted: 19 Nov 2021 09:41 AM PST I had a target t1.target which i cannot modify directly but can only modify through drop-in conf file. This target has: [Unit] OnFailure=s1.service On my drop-in conf file I write: [Unit] OnFailure= OnFailure=s2.service When t1.target fails, my expectation would be only s2.service started as in my understanding that "OnFailure=" should clear all the services to be run when t1.target fails. However i saw both s1.service and s2.service are started. Is there a way to have only s2.service run? How can OnFailure setting be cleared or can it be cleared? Thank you very much! |
Is it somehow possible to detect if a bluetooth controller has been restarted? Posted: 19 Nov 2021 09:12 AM PST I'm using BlueZ, along with an external Bluetooth controller (via HCI). For that, I need to run hciattach (or btattach ) to make a standard hci0 interface. Everything works, however sometimes my controller crashes and restarts. After the restart, standard BlueZ commands, bluetoothd , hcitool etc are not working, until I manually reset the hci0 by: hciconfig hci0 reset which technically equals to hciconfig hci0 down; hciconfig hci0 up After this command, all standard BlueZ commands are back in life. Now, is it somehow possible to detect if the controller has been restarted, over the standard hci interface? |
Is there some software in foss which can be used to do pick one name from number of names [duplicate] Posted: 19 Nov 2021 08:06 AM PST A friend of mine is organizing a competition of sorts. He has asked to know if there is some software where one puts names of people who have answered correctly and then the software picks up a name and shares it as an answer. All names equally weighed and let the A.I. or whatever do its thing. |
Is there an (easy) way to intercept a system call sysconf(_SC_PHYS_PAGES) in Linux to tell Chrome that we only have 1GB, use it wisely? Posted: 19 Nov 2021 09:19 AM PST I understand when Chrome sees any free RAM it allocates it for cache etc. And there is no option to tell it to minimise its memory usage (please correct me if there is). Is there an (easy) way to intercept a system call sysconf(_SC_PHYS_PAGES) or similar in Linux to tell Chrome that we only have 1GB, use it wisely? |
Set a reminder every X days before password expiration Posted: 19 Nov 2021 07:44 AM PST is there any way to set a password reminder every each X days before password expiration in Y days of overall Z days? I would need to set this offline (i.e. no change command). For example, I would need a password policy done like this: |
cron hourly calling application that has been removed Posted: 19 Nov 2021 12:01 PM PST I had installed timeshift and then removed it. But now in my journal I find that cron expects to find it. I quote the error below. I check the cron.hourly directory and find that it contains only a script that aborts the cron if the system is on battery power. It then calls anacron on /etc/anacrontab but there is nothing in /etc/anacrontab that refers to timeshift. From the journal: Nov 19 05:01:01 meer CROND[2401130]: (root) CMDEND (run-parts /etc/cron.hourly) Nov 19 05:01:01 meer CROND[2401131]: (root) CMD (run-parts /etc/cron.hourly) Nov 19 05:00:01 meer CROND[2400392]: (root) CMDEND (timeshift --check --scripted) Nov 19 05:00:01 meer CROND[2400392]: (root) CMDOUT (/bin/bash: line 1: timeshift: command not found) Nov 19 05:00:01 meer CROND[2400393]: (root) CMD (timeshift --check --scripted) Nov 19 04:01:01 meer CROND[2362544]: (root) CMDEND (run-parts /etc/cron.hourly) Nov 19 04:01:01 meer CROND[2362545]: (root) CMD (run-parts /etc/cron.hourly) Nov 19 04:00:01 meer CROND[2361908]: (root) CMDEND (timeshift --check --scripted) Nov 19 04:00:01 meer CROND[2361908]: (root) CMDOUT (/bin/bash: line 1: timeshift: command not found) Nov 19 04:00:01 meer CROND[2361909]: (root) CMD (timeshift --check --scripted) |
1.2 million lines written every hour of the day in my system's log Posted: 19 Nov 2021 09:22 AM PST Something is eating my disk space and I'm distinctly annoyed by it. This morning I woke up to the "No space remaining" notification, and I realized that it wasn't my torrenting what had beed steadily eating my disk space these last few weeks. I du 'd my way around my filesystem, and I found out this: /var/log > du -hs * | sort -h ... 480M kern.log.2.gz 492M syslog.2.gz 719M kern.log.3.gz 737M syslog.3.gz 1,2G kern.log.4.gz 1,2G syslog.4.gz 4,0G journal 14G kern.log 14G syslog 19G kern.log.1 19G syslog.1 I inspected the files, and I was astonished about their contents: /var/log > tail -n 10000000 syslog.1 | uniq -cd -w9 163183 Nov 13 15:52:09 raul-cloud kernel: [421137.114299] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1241786 Nov 13 16:00:00 raul-cloud kernel: [421607.842156] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1226956 Nov 13 17:00:00 raul-cloud kernel: [425207.640228] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1227458 Nov 13 18:00:00 raul-cloud kernel: [428807.427407] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1226084 Nov 13 19:00:00 raul-cloud kernel: [432407.225316] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1244380 Nov 13 20:00:00 raul-cloud kernel: [436007.023373] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1229629 Nov 13 21:00:00 raul-cloud kernel: [439606.810409] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1239934 Nov 13 22:00:00 raul-cloud kernel: [443206.608482] pcieport 0000:00:01.3: PME: Spurious native interrupt! 1153889 Nov 13 23:00:00 raul-cloud kernel: [446806.406534] pcieport 0000:00:01.3: PME: Spurious native interrupt! 46701 Nov 14 00:00:00 raul-cloud kernel: [450406.193587] pcieport 0000:00:01.3: PME: Spurious native interrupt! (kern.log.1 , syslog and kern.log had similar lines) What kind of eldritch monstrosity is waking up every hour of the day to yell 1.2 million freaking lines to 4 distinct files, and how can I slay the beast?! Or, more seriously now, how do I find out what's logging these lines, how do I stop it, and what logs can I safely delete? Edit 1: Thanks for answering me. I know there are no eldritch creatures in Linux/Unix :D I'm a really new full-time user of the OS and everything (mostly) just worked until now, so I kinda panicked there Anyways, here's the output of lspci : / > sudo lspci -vv -s 00:01.3 00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin ? routed to IRQ 27 IOMMU group: 2 Bus: primary=00, secondary=03, subordinate=1f, sec-latency=0 I/O behind bridge: 0000f000-0000ffff [size=4K] Memory behind bridge: f7500000-f76fffff [size=2M] Prefetchable memory behind bridge: [disabled] Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR- BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16+ MAbort- >Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- Capabilities: [50] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [58] Express (v2) Root Port (Slot+), MSI 00 DevCap: MaxPayload 512 bytes, PhantFunc 0 ExtTag+ RBE+ DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- LnkCap: Port #2, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <64us ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+ LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+ ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 8GT/s (ok), Width x4 (ok) TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt- SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise- Slot #0, PowerLimit 0.000W; Interlock- NoCompl+ SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg- Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock- SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock- Changed: MRL- PresDet- LinkState+ RootCap: CRSVisible+ RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ RootSta: PME ReqID 1800, PMEStatus+ PMEPending+ DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR- 10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt+ EETLPPrefix+, MaxEETLPPrefixes 1 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd+ AtomicOpsCap: Routing- 32bit+ 64bit+ 128bitCAS- DevCtl2: Completion Timeout: 65ms to 210ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd- AtomicOpsCtl: ReqEn- EgressBlck- LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS- LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis- Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+ EqualizationPhase1+ EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest- Retimer- 2Retimers- CrosslinkRes: unsupported Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Address: 00000000fee00000 Data: 0000 Capabilities: [c0] Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge Capabilities: [c8] HyperTransport: MSI Mapping Enable+ Fixed+ Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?> Capabilities: [150 v2] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn- MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap- HeaderLog: 00000000 00000000 00000000 00000000 RootCmd: CERptEn+ NFERptEn+ FERptEn+ RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0 ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 Capabilities: [270 v1] Secondary PCI Express LnkCtl3: LnkEquIntrruptEn- PerformEqu- LaneErrStat: LaneErr at lane: 0 1 2 3 Capabilities: [2a0 v1] Access Control Services ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans+ ACSCtl: SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl- DirectTrans- Capabilities: [370 v1] L1 PM Substates L1SubCap: PCI-PM_L1.2- PCI-PM_L1.1+ ASPM_L1.2- ASPM_L1.1+ L1_PM_Substates+ L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1- L1SubCtl2: Capabilities: [3c4 v1] Designated Vendor-Specific: Vendor=1022 ID=0001 Rev=1 Len=44 <?> Kernel driver in use: pcieport The thing is, 01.1, 01.3, 03.1 are PCIe GPP Bridge and 07.1 and 08.1 are Internal PCIe GPP Bridge 0 to Bus B , but I don't really know how they differ or why the others are not throwing any errors. Is there any way to debug this further? |
Delete all backup DIRS BUT keep only the most recent 14 days AND every first-of-month backup Posted: 19 Nov 2021 11:29 AM PST What I Need I'm having trouble creating a script (bash?) that is going to be used in cron, run nightly, unattended, that deletes all backup DIRS except ALL first-of-month backups AND the 14 latest, even if older. If bash won't do, then shell and POSIX as I need this to be portable. Script must be safe, elegant, and Where I'm Stuck: recognize that no backups have happened since May and STILL keep the most recent (May) 14 backups, as those are the MOST RECENT, even if script runs in November. In all cases, script must keep all backups dated with a 01 in the day (-YYYYMMDD-) portion of the name. What I Have - I have DIRS containing backups
- The backup date is in the DIR name
- Script must read contents of
/path/to/backups/example.com/ and decide which DIRS inside to remove - DIRS are not empty. They contain the backups for that day.
/path/to/backups/example.com/example.com-20210101-backup/ // Keep (first of month) /path/to/backups/example.com/example.com-20210201-backup/ // Keep (first of month) /path/to/backups/example.com/example.com-20210301-backup/ // Keep (first of month) /path/to/backups/example.com/example.com-20210401-backup/ // Keep (first of month) /path/to/backups/example.com/example.com-20210501-backup/ // Keep (first of month) /path/to/backups/example.com/example.com-20210502-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210503-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210504-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210505-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210506-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210507-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210508-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210509-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210510-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210511-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210512-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210513-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210514-backup/ // <-- Script to remove /path/to/backups/example.com/example.com-20210515-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210516-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210517-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210518-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210519-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210520-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210521-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210522-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210523-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210524-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210525-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210526-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210527-backup/ // Keep (Most recent 14 days even if old) /path/to/backups/example.com/example.com-20210528-backup/ // Keep (Most recent 14 days even if old) Why a Script for This Because, one day backups might resume and have new DIRS to remove unattended. What I've Found Everything I find either deletes all but the most recent 14 OR only keeps the first-of-months, not both. For example, as per: https://unix.stackexchange.com/a/379041 find /path/to/backups/example.com/ -type d -mtime +14 -exec rm -rf {} + would only show the 14 most recent from the date the script was run, which if run in November, won't show or remove anything. My Trouble Trouble creating a safe script that BOTH keeps all first-of-month backups AND the 14 latest, even if old. Any help pointing me in the right direction is appreciated, --Thank You! |
Find pattern: sort and delete older files Posted: 19 Nov 2021 11:30 AM PST I want to delete old files and keep only the most recent from each file pattern based on the first five digits (aa_te, bb_co, cc_co, dd_xy ) and the date and time in the file name. Note: All files have .err.mm_dd_yyyy hr_mm_ss am/pm.csv for the sorting. Filename length may vary Example: I have the below Excel files in my folder c/test aa_te_bbc_207_mc_ghghgh.err.05_31_2021 7_15_04 am.csv aa_te_ccd.err.05_30_2021 7_55_35 pm.csv bb_co_ddee_354_m.err.06_15_2021 5_20_00 am.csv bb_co_eeffff.err.06_15_2021 5_20_01 am.csv cc_co_eeffyy_cc.err.04_10-2020 12_00_00 am.csv dd_xy_eeffyyvv_cc.err.04_10-2020 12_00_00 am.csv dd_xy_eeffyyvv_cc.err.04_10-2020 12_10_25 am.csv What I expect: aa_te_bbc_207_mc_ghghgh.err.05_31_2021 7_15_04 am.csv bb_co_eeffff.err.06_15_2021 5_20_01 am.csv cc_co_eeffyy_cc.err.04_10-2020 12_00_00 am.csv dd_xy_eeffyyvv_cc.err.04_10-2020 12_10_25 am.csv |
"Failed to start load/save screen backlight brightness" after spontaneous restart Posted: 19 Nov 2021 07:38 AM PST My PC is running Manjaro. Unfortunately since recently my PC is restarted by itself and is then displayed to me that. [FAILED] Failed to start load/save screen backlight brightness of backlight:acpi_video0 Can someone please explain to me what this is and how I can fix it? |
How to install Internet Explorer on Raspberry Pi running Ubuntu 21.04? Posted: 19 Nov 2021 09:27 AM PST I installed Ubuntu desktop 21.04 on my Raspberry Pi 4b. I want to switch from Mozilla Firefox, the default browser, to Internet Explorer. The only download I could find was an .exe and those are for Windows. I found that I need Wine, I've installed a 64 bit version of that, but the version of internet explorer I've tried only works on AMD64 processors, but what I have is an ARM64 processor. Is there an emulator for ARM64 that is free and easy to configure? I could not find how to do it on a pi 4b at all. |
How can I enable/disable a jail using fail2ban? Posted: 19 Nov 2021 10:45 AM PST We can add a line like this below a specific jail in the jail.local file, and control the jail: enabled = true/false But I think there should be a command to do this, as we've got bunch of "set" commands here: https://www.fail2ban.org/wiki/index.php/Commands But I can't find a related command for doing this. I don't want to do it manually, anybody knows a command to do this? |
installing Realtek 8821ce on RHEL 8 Posted: 19 Nov 2021 10:00 AM PST I am trying to install my wifi card driver on RHEL 8 for the 8821CE. I am temporarily using an 88XXau for a usb wifi adapter. I've been looking for a solution for a while and came across two main git repos: https://github.com/lwfinger/rtlwifi_new/tree/rtw88 https://github.com/tomaspinho/rtl8821ce/ the rtw88 still doesn't support the 8821CE Card as far as I can tell. I managed to install the /tomaspinho dkms module after editing the code and following the issues section to solve compilation problems related to kernel version: https://github.com/tomaspinho/rtl8821ce/issues?q=centos This basically involved changing some ifdef definitions to suit the old kernel that is using recent or backported code to my knowledge. Now I am at a point where the dkms module installed correctly and I can see the module loaded in lsmod output, but the card is still not detected and I wonder what I can do from this point forward. Thank you in advance for your help. lsmod: lsmod | grep 8821 8821ce 2023424 0 cfg80211 806912 2 88XXau,8821ce kernel: uname -r 4.18.0-193.1.2.el8_2.x86_64 dmesg: dmesg | grep 8821 [ 0.758821] pci_bus 0000:00: root bus resource [mem 0xfee00000-0xffffffff window] [ 3.187034] 8821ce: loading out-of-tree module taints kernel. [ 3.218784] rtl8821ce 0000:02:00.0: enabling device (0000 -> 0003) [ 3.248873] Modules linked in: crc32_pclmul(+) 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod [ 3.248981] ? rtw_chbw_to_freq_range+0x40/0x96 [8821ce] [ 3.249021] ? rtw_is_dfs_ch+0x34/0x70 [8821ce] [ 3.249067] ? rtw_regd_apply_flags+0xc9/0xda [8821ce] [ 3.249113] rtw_wiphy_register+0x1e/0x20 [8821ce] [ 3.249159] rtw_cfg80211_ndev_res_register+0x11/0x17 [8821ce] [ 3.249203] rtw_os_ndev_register+0xf2/0x157 [8821ce] [ 3.249248] rtw_os_ndevs_register+0x9e/0xce [8821ce] [ 3.249292] rtw_os_ndevs_init+0x24/0x3a [8821ce] [ 3.249334] rtw_drv_init+0x4f/0xac [8821ce] [ 3.249389] rtw_drv_entry+0x48/0x1000 [8821ce] [ 3.249485] WARNING: CPU: 6 PID: 528 at /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/os_dep/linux/os_intfs.c:1681 rtw_os_ndev_register+0x64/0x157 [8821ce] [ 3.249485] Modules linked in: crc32_pclmul(+) 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod [ 3.249537] RIP: 0010:rtw_os_ndev_register+0x64/0x157 [8821ce] [ 3.249589] rtw_os_ndevs_register+0x9e/0xce [8821ce] [ 3.249632] rtw_os_ndevs_init+0x24/0x3a [8821ce] [ 3.249675] rtw_drv_init+0x4f/0xac [8821ce] [ 3.249722] rtw_drv_entry+0x48/0x1000 [8821ce] [ 3.258088] WARNING: CPU: 6 PID: 528 at /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/os_dep/linux/os_intfs.c:3141 rtw_os_ndevs_register+0xa6/0xce [8821ce] [ 3.258090] Modules linked in: crct10dif_pclmul(+) crc32_pclmul 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod [ 3.258154] RIP: 0010:rtw_os_ndevs_register+0xa6/0xce [8821ce] [ 3.258215] rtw_os_ndevs_init+0x24/0x3a [8821ce] [ 3.258262] rtw_drv_init+0x4f/0xac [8821ce] [ 3.258319] rtw_drv_entry+0x48/0x1000 [8821ce] [ 10.280025] Bluetooth: hci0: rtl: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821 [ 10.280028] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_config.bin [ 10.283364] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_fw.bin [ 21.489998] dm_crypt amdgpu crct10dif_pclmul crc32_pclmul 8821ce(OE) 88XXau(OE) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod ifconfig(wlp4s0f3u2 is my usb wifi adapter): ifconfig -a eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether f8:b4:6a:b5:fb:23 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 6454 bytes 443527 (433.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 6454 bytes 443527 (433.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:74:aa:45 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether 52:54:00:74:aa:45 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp4s0f3u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 2312 inet 192.168.2.22 netmask 255.255.255.0 broadcast 192.168.2.255 inet6 fe80::e1d3:1071:71d9:6b63 prefixlen 64 scopeid 0x20<link> ..... I can see the card with this command, but I am not sure if it is due to the driver or not: lshw -C network *-network UNCLAIMED description: Network controller product: RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: cap_list configuration: latency=0 resources: ioport:f000(size=256) memory:fe900000-fe90ffff Update Since I am trying different drivers, I am blacklisting them at /etc/modprob.d to make sure only one loads at a time, please let me know if this is enough I opened an issue at rtw88(https://github.com/lwfinger/rtlwifi_new/issues/608), they confirm the firmware was missing and added that to the repo, but this created an new issue: [ 12.378158] rtw_8821ce 0000:02:00.0: Firmware version 24.5.0, H2C version 12 [ 12.404834] rtw_8821ce 0000:02:00.0: rfe 2 isn't supported [ 12.404937] rtw_8821ce 0000:02:00.0: failed to setup chip efuse info [ 12.404939] rtw_8821ce 0000:02:00.0: failed to setup chip information Update 2 This has been resolved with rtw88 driver by lwfinger after his updates to the code base. the driver works as intended now for the 8821ce! |
Horizontal equivalent of zz in vim Posted: 19 Nov 2021 09:53 AM PST If I press zz in vim, my screen/view will center vertically on the cursor position. How can I do the same, but horizontally? Is there a vim command for that? |
Tap-to-Click is Shown, but Can't Be Toggled Posted: 19 Nov 2021 09:50 AM PST The touchpad on my laptop is a poor design, because it doesn't recede down into its housing to avoid my thenar and hypothenar's proclivity for inadvertent tap-to-clicks. In Ubuntu 19.10, using this same laptop, I was able to toggle off "Tap to Click", as shown here. However, in Kubuntu 20.04, this option is grayed out (disabled), and cannot be Toggled: Is there another way that I might disable Tap-to-Click, given that the GUI isn't offering the ability to toggle this setting? |
How do I search my zsh aliases? Posted: 19 Nov 2021 11:19 AM PST Right now I do something like this: cat ~/.oh-my-zsh/plugins/git/git.plugin.zsh | grep alias | grep rebase to search, say, git aliases that have rebase. How do I search through all plugins that define aliases (or through all my defined aliases?) for keywords? |
Why doesn't dig myip.opendns.com @resolver1.opendns.com use sshuttle's proxy? Posted: 19 Nov 2021 09:03 AM PST I am using the great technique from How can I get my external IP address in a shell script? to find my public IP address: dig +short myip.opendns.com @resolver1.opendns.com I'm also using sshuttle as a proxy over ssh tunnel. It is started to forward traffic on all ports and IPs (including DNS requests) using the following command: sshuttle --dns -vr usr@sshserver 0/0 After the proxy has started I visit https://canihazip.com/s to verify that my external IP has changed. It has, but when I run the dig command again, it reports the same external IP reported as before the proxy was started. From the verbose output, sshuttle seems to be forwarding on other dig commands, and checking https://dnsleaktest.com only reveals the IP on the other end on my proxy, as expected. As far as I can tell sshuttle seems to be working. Can anyone explain why the dig command reports my external IP before the proxy? My aim is make it seem to the opendns servers that the request is originating from my ssh server. It's a bit over my head, but I had a quick look in Wireshark and when filtering for DNS traffic Wireshark doesn't see any DNS requests apart from the above DIG command. The command is bypassing the proxy. I'm happy to use any of the other (less elegant) ways to find my external IP, but this makes me ask the question: what else is bypassing sshuttle? |
SSL Certificate Problem: unable to get local issuer certificate Posted: 19 Nov 2021 08:04 AM PST I am having small initramfs with static busybox into it. The sole purpose of this initramfs is to download/upload files to the HTTPS server. I have the proper certificate and credentials to do so. But when I execute the command: curl --cacert /tmp/filename.pem -T /tmp/file_to_upload -u user:pass https://Server_name/ I greeted with an error: curl: (60) SSL certificate problem: unable to get local issuer certificate If I use the same command with same certificate onto Ubuntu, then everything goes smooth. How am I suppose to resolve this issue ? EDIT: I do not want to use "-k" or "--insecure" switch NOTE: I do not have openssl or /etc/ssl directory into initramfs |
Resolving conflict on Manjaro update 2015-07-02 Posted: 19 Nov 2021 12:00 PM PST I'm updating Manjaro (arclinux), but there are some errors that could not be resolved: ==> New package : extra/libgudev 230-1 (required by colord) ==> Continue upgrade ? [Y/n] ==> [V]iew package detail [M]anually select packages ==> -------------------------------------------------- ==> :: Starting full system upgrade... resolving dependencies... looking for conflicting packages... :: libgudev and libsystemd are in conflict. Remove libsystemd? [y/N] error: unresolvable package conflicts detected error: failed to prepare transaction (conflicting dependencies) :: libgudev and libsystemd are in conflict (libsystemd<221) I've tried to remove systemd , libsystemd , colord , but it still can't be resolved, how to resolve this? |
How to fix this eth0 and eth1, where traffic going out via eth0 is failing? Posted: 19 Nov 2021 11:05 AM PST I have two public IPs. One's connected to eth0 and one to eth1, from 2 separate routers as complete DMZ towards the LAN IP. I added this following: ip rule add from 10.0.0.108/32 table 1 # outbound ip rule add to 10.0.0.108/32 table 1 # inbound ip route add default via 10.0.0.1 dev eth0 table 1 ip rule add from 10.0.0.100/32 table 2 # outbound ip rule add to 10.0.0.100/32 table 2 # inbound ip route add default via 10.0.0.1 dev eth1 table 2 Since adding this above, I've been having problems sending traffic correctly for inbound and outbound. For example: $ ping -I eth0 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 10.0.0.108 eth0: 56(84) bytes of data. From 10.0.0.108 icmp_seq=2 Destination Host Unreachable From 10.0.0.108 icmp_seq=3 Destination Host Unreachable From 10.0.0.108 icmp_seq=4 Destination Host Unreachable $ ping -I eth1 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 10.0.0.28 eth1: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=48 time=14.6 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=48 time=14.6 ms ^C --- 8.8.8.8 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1233ms rtt min/avg/max/mdev = 14.611/14.639/14.667/0.028 ms How do I use ip rule add from/to method to fix the eth0 (from/to), but without breaking the eth1 (eth1 is working perfect). |
No comments:
Post a Comment