Friday, August 6, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Shrunk virtual disk file, now reported file size doesn't match

Posted: 06 Aug 2021 09:58 AM PDT

I originally had a single virtual disk file (.qcow2) of roughly 3.5 TiB and I decided to "group" all similar data on its own virtual disk file, for various reasons. Obviously that meant I could shrink the original disk file (to 900 GiB) but ls, stat and friends still list the original 3.5 TiB:

$ ls -lhks mydisk.qcow2   722G -rw-r--r-- 1 root root 3.5T Aug  6 18:06 mydisk.qcow2  

Of course I shrunk the filesystem itself (ext4) and sparsified the file afterwards, which is why only 722 GiB is currently allocated. But my backup tools also still detect 3.5 TiB and so will scan it all while the disk itself is only capable of holding 900 GiB, meaning it takes almost 4 times longer to finish than it has to.

How can I "refresh" the reported sizes? This is a machine with HDDs so I'm thinking maybe the file is too fragmented and there's some stuff around the 3.5 TiB mark? But wouldn't copying the file fix that automatically (I tried and it didn't, at least)? Also, the disk file itself resides on ZFS, if that matters.

If at all possible any solution would preferably work in-place. Shutting down the VM using the disk for a little while is not a problem.

Extract lines from a file based on a range that fall within the range from another file

Posted: 06 Aug 2021 09:00 AM PDT

I have a file with ca. 17000 rows for which I need to extract rows based on values from columns 2 and 3 (which are the start and end of a range):

file_1.txt

NC_018723.3 88839   102219  NC_018723.3 156206  160651  NC_018723.3 160885  165615  NC_018723.3 178410  191119  NC_018723.3 226179  242932  NC_018723.3 243929  310071  NC_018723.3 384020  413475  

I have a second file, also with ranges:

file_2.txt

8410001 8420000  8420001 8430000  28550001    28560000  28560001    28570000  111910001   111920000  111920001   111930000  209310001   209320000  209320001   209330000  209330001   209340000  

I'm looking for a way to extract rows from file_1.txt for which the range of column 2 and 3 fall within the ranges of file_2.txt.

Any ideas would be appreciated.

GNU awk not working as expected

Posted: 06 Aug 2021 08:53 AM PDT

I am going through a tutorial on awk which requires using '.awk' file. I am having issues going forward with it as awk is not working as expected. Here is the code I am using. Contents of the virt.awk file

BEGIN { RS="\n\n" ; }  $0 ~ search { print }  

Now the expected result is I search for a pattern and the particular Record should be displayed. But when I try the following I get the entire file displayed.

Command I am using:

awk -f virt.awk search=domain1 virtualhosts.conf  

No matter what I use in the search term, I get the entire file printed. All entries of domain1, domain2 domain3 etc Could someone please help?

Note: it is just a copy of virtualhosts.conf file and it is preformatted to have exactly the format i.e. blank line after each entry and no additional blank lines in between.

Contents of virtualhost.conf: (and the result I am getting always):

<VirtualHost 172.20.30.40:80>  DocumentRoot "/www/domain1"  ServerName www.domain1.com  #Other options  </VirtualHost>    <VirtualHost 172.20.30.40:8080>  DocumentRoot "/www/domain2"  ServerName www.domain2.com  #Other options  </VirtualHost>    <VirtualHost 172.20.30.50:80>  DocumentRoot "/www/domain3-80"  ServerName www.domian3.org  #Other options  </VirtualHost>    <VirtualHost 172.20.30.50:8080>  DocumentRoot "/www/example2-8080"  ServerName www.example.org  #Other options  </VirtualHost>  

Additional Details: I found that I was using mawk so I installed gawk but I still get the same result. I am using pop-os 20.04 and dash by the way (if that affects anything)

user@pop-os:~/linuxwork$ which awk  /usr/bin/awk  user@pop-os:~/linuxwork$ ll /usr/bin/awk  lrwxrwxrwx 1 root root 21 Mar 30 21:10 /usr/bin/awk -> /etc/alternatives/awk*  user@pop-os:~/linuxwork$ ll /etc/alternatives/awk  lrwxrwxrwx 1 root root 13 Aug  6 20:21 /etc/alternatives/awk -> /usr/bin/gawk*  user@pop-os:~/linuxwork$  

how xfce's 'switch application' can use recently used application order?

Posted: 06 Aug 2021 08:08 AM PDT

Is it possible to modify the xfce's 'switch application' to use recently used application order? Like Alt+Tab does. Thank you for helping.

What's wrong with my sed replace?

Posted: 06 Aug 2021 08:11 AM PDT

I'm trying to extract a users email from a perforce users command using regex. But for some reason I'm getting this problem. Could someone tell me what I'm doing wrong?

p4 user -o $user | grep 'Email:' | awk '/Email:/{i++}i==2' | sed -e 's/Email:  //g'  

I'm getting this: Email: perforce@master

But the intent is to get just the stuff after Email:

Asynchronous json post requests with cURL, minimize overhead?

Posted: 06 Aug 2021 07:25 AM PDT

I think my method to make asynchronous post requests to API endpoint has some overhead. From stackoverflow I learned that libcurl is an alternative way but I am not familiar with libcurl and that with '&' i am opening a new connection everytime resulting overheads. I realized the keep-alive connection keeps the connection alive, still how do I make the json post request to api asynchronously and rapidly iterative, with very little overheads than my approach.

while :; do     curl -s 'https://test.com' \    -H 'Connection: keep-alive' \    -H 'Pragma: no-cache' \    -H "X-XSRF-TOKEN: ${XSRF}" \    -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/92.0.4515.107' \    -H 'Content-Type: application/json' \    -H 'Accept: application/json, text/plain, */*' \    -H 'Origin: https://test.com' \    -H 'Referer: https://test.com/user' \    -H 'Accept-Language: en-US,en;q=0.9' \    -H "Cookie: XSRF-TOKEN=${XSRF}" \    --data-raw '{"orderBook":"testUserName"}' \    --compressed &  done  

Issue with awk statement

Posted: 06 Aug 2021 09:11 AM PDT

I am trying to count the null records of a column in a file, subject to a condition. But the condition is not working.

  • Example input: fixed width file,
                     761128424607/22/20197611284246CAD052020DHH 0073578EKLAVY3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ELEKBAFXXL7900271761128424406/22/20197611284244CAD042020DKA 0038244EDITTU8                   761128424606/22/20197611284246CAD052020DHH 0073578EKLAVY3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ELEKBAFXXL7900271761128424406/22/20197611284244CAD042020DKA 0038244EDITTU8  
  • code
    RE='[[:space:]]{17}' awk -v m=1 -v p=17 -v r='&& substr($0,28,2)==06'      $'BEGIN{re = ENVIRON["RE"]}{c = substr($0,m,p)}  c ~ "^(" re ")$" r  {N++}  END {print N+0}' <  input_file.txt  
  • Desired output: 1, since 2 records having null in file and out of this 1 record satisfies condition substr($0,28,2)==06
  • Actual output: 0, which is wrong

How to take parameter "AS IS" in a bash script?

Posted: 06 Aug 2021 08:36 AM PDT

I have this script called readvar.sh:

#! /bin/bash  a="$1"  

echo "$a"

I'd want to get the parameter literally as user entered,

For example if user runs: ./readvar.sh \\

It should outputs \\ without need of enclosing parameter with quotes.

Is that possible?

How can I make sure that man has pages installed?

Posted: 06 Aug 2021 09:37 AM PDT

Everytime I run man it returns an error as if no man page entries were installed. Here's an example:

% man man

No manual entry for man

However, I have installed the packages man-db and man-pages, yet it doesn't return a single entry. I have tried with many commands like % man ls, and others.

Also, if i run % whatis man, the following is returned:

man: nothing appropriate.

break Raid1 to use both partitions without losing Data

Posted: 06 Aug 2021 06:15 AM PDT

i'm running Ubuntu 20.10 (x86-64) that has a disk size of 2 x 1TB SSD

when i run lsblk i get this output (here we see there are 2 1TB disks)

:~$ lsblk  NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT  nvme0n1     259:0    0 953.9G  0 disk    ├─nvme0n1p1 259:2    0     4G  0 part    │ └─md0       9:0    0     4G  0 raid1 [SWAP]  ├─nvme0n1p2 259:3    0   512M  0 part    │ └─md1       9:1    0   511M  0 raid1 /boot  └─nvme0n1p3 259:4    0 949.4G  0 part      └─md2       9:2    0 949.2G  0 raid1 /  nvme1n1     259:1    0 953.9G  0 disk    ├─nvme1n1p1 259:5    0     4G  0 part    │ └─md0       9:0    0     4G  0 raid1 [SWAP]  ├─nvme1n1p2 259:6    0   512M  0 part    │ └─md1       9:1    0   511M  0 raid1 /boot  └─nvme1n1p3 259:7    0 949.4G  0 part      └─md2       9:2    0 949.2G  0 raid1 /  

but when i run the command : df -h --total i get this output:

df: /run/user/1000/doc: Operation not permitted  Filesystem      Size  Used Avail Use% Mounted on  tmpfs            13G  8.8M   13G   1% /run  /dev/md2        934G  886G     0 100% /  tmpfs            63G     0   63G   0% /dev/shm  tmpfs           5.0M     0  5.0M   0% /run/lock  tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup  /dev/md1        487M  328M  134M  71% /boot  tmpfs            13G  156K   13G   1% /run/user/1000  tmpfs            13G  120K   13G   1% /run/user/114  total           1.1T  887G  101G  90% -  

and the "Disk Usage Analyzer" print this output

enter image description here

so the system is aware just of 1TB and not using the second 1TB at all.

what should i do, to make use the the 2nd 1TB without losing any data (if possible). so that also the "disk usage analyser" can use and detect the 2nd 1TB ?

can someone help here please

Restore open windows after restart/shutdown on Scientific Linux?

Posted: 06 Aug 2021 06:00 AM PDT

Is there a way in Scientific Linux to restore all open applications upon the last restart/shut down?

Speed up API Post requests than curl?

Posted: 06 Aug 2021 05:59 AM PDT

I am trying to make API post requests of JSON to a web server. This task needs to be asynchronous with least overhead. I am currently using CURL with infinite looping in bash and used '&' to make it asynch, which is slow for my task. How do I boost and reduce asynchronous API post task from CURL or without it? Are there any alternative tools that I can implement for this task?

Can I sort the output of ip address?

Posted: 06 Aug 2021 05:39 AM PDT

I have a router with a few hundred network interfaces (most of which virtual, naturally). That means that the output of

ip a  

shows very many lines which makes management and analysis difficult. Items 1 to 255 are sorted by item number but from 256 the numbers are calculated mod 256 before sorting them which means they are interleaved (e.g. 256, 257, 1, 258, 2, ...):

# ip a s up  256: veth-99-02@br-vxlan-99-02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000      link/ether ab:cd:ef:99:88:77 brd ff:ff:ff:ff:ff:ff      inet 10.2.99.254/24 scope global veth-99-02         valid_lft forever preferred_lft forever  257: vxlan-22-01: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master br-vxlan-20-01 state UNKNOWN group default qlen 1000      link/ether ab:cd:ef:99:88:77 brd ff:ff:ff:ff:ff:ff  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00      inet 127.0.0.1/8 scope host lo         valid_lft forever preferred_lft forever  258: br-vxlan-22-01: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default qlen 1000      link/ether ab:cd:ef:99:88:77 brd ff:ff:ff:ff:ff:ff  2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000      link/ether ab:cd:ef:99:88:66 brd ff:ff:ff:ff:ff:ff  

Is there a way to correctly sort this output by number? (They are multi line entries so | sort -n won't do.)

Or, can I select to display numbers e.g. up to 42?

I tried to select by type (ip a s type ...) but that does not really work.

Holding two or more variables by one variable

Posted: 06 Aug 2021 05:50 AM PDT

I know that in various programming languages there is an option to hold two or more variables (or just one variable) by some variable; a typical example in general is to store coordinates.

Is this practice of holding two or more variables by one variable exist in shell (say, Bash) and what would be a typical example?

change order of lines position in json file [closed]

Posted: 06 Aug 2021 09:46 AM PDT

i want the row of description to be after row of body

EXAMPLE.

from:

{      "foo": {          "prefix": "foo",          "description": "foo",          "body": [              "line 1",              "  line 2"          ]      },      "bar": {          "prefix": "bar1",          "description": "bar 1 bar",          "body": [              "line 1",              "  line 2",              "  line 3",              "...."          ]      }  }  

TO:

{      "foo": {          "prefix": "foo",          "body": [              "line 1",              "  line 2"          ],          "description": "foo"      },      "bar": {          "prefix": "bar1",          "body": [              "line 1",              "  line 2",              "  line 3",              "...."          ],          "description": "bar 1 bar"      }  }  

How to: Copy Images from Gnome to public_html on same server

Posted: 06 Aug 2021 09:36 AM PDT

Hi there I am using CentOS7 as server + GUI. I want to move pictures from Gnome to a public_html directory. What is wrong with my command?

cp -R ~orca/Documents/Tree\ of\ Knowledge/oceanahomes.com/393\ Hastings/Pictures/ /var/www/oceanahomes.org/public_html/393     cp: cannot stat '/home/orca/Documents/Tree of Knowledge/oceanahomes.com/393 Hastings/Pictures/': No such file or directory  

On the terminal I am logged in as orca user. I can su

What am I getting wrong here?

Is it syntactically correct/good practice to use use $# and $? in arithmetic test conditions?

Posted: 06 Aug 2021 05:23 AM PDT

I have seen a number of posts using

if [ $? -ne 0 ]; then      return  fi    if [ $? -eq 0 ]; then    eval "set -- ${opts}"    while [ $# -gt 0 ]; do      case $1 in  

for checking the value of "last exit status" and "number of positional parameters".

However, I have been using $# and $? as follows with no apparent problems:

if (( $? != 0 )); then   ...  

or

if (( $? == 0 )); then    ...  

So, is one of these approaches bad practice or a "stretch" of the syntax rules, with the other one being "the correct" way to use these variables? Or can one safely use both styles?

Why does a network connection not change from "unmanaged"?

Posted: 06 Aug 2021 05:15 AM PDT

I'm a month into a disasterous upgrade of my ProtonVPN CLI client from 2.2.6 to 3.7.2 on Ubuntu 18.04, and the VPN still doesn't work (this question is related to my previous question).

Here is the current status of my devices:

$ nmcli d  DEVICE          TYPE      STATE         CONNECTION   wlp3s0          wifi      connected     WifiAP  proton0         tun       disconnected  --           enp2s0          ethernet  unavailable   --           ipv6leakintrf0  dummy     unmanaged     --           lo              loopback  unmanaged     --           

ProtonVPN support has explained that they don't "support unmanaged connections", still not sure what that means. They supplied me with the following commands to change this:

$ sudo nmcli dev set proton0 managed yes  

This changed the proton0 connection from "unmanaged" to "disconnected", as seen above. Then I ran

$ sudo nmcli dev set ipv6leakintrf0 managed yes  

and this did nothing. It did not affect the status of ipv6leakintrf0 in any way.

Why will this device refuse to change from "unmanaged"?

Update

According to this page, having an entry in an /etc/network/interfaces file can make a device be unmanaged.

I can't find any reference to ipv6leakintrf0 in any of these files, however, so I don't think this is the problem:

$ grep -IRF "ipv6" /etc/network/*  {no results}  

How to list package dependents on Nix?

Posted: 06 Aug 2021 09:43 AM PDT

I get this error:

Package 'python2.7-Pillow-6.2.2' in /nix/store/...-nixos-21.05.1590.63ee5cd99a2/nixos/pkgs/development/python-modules/pillow/6.nix:19 is marked as insecure, refusing to evaluate.  

when running home-manager switch.

I didn't install this package directly.

How can I see what are dependent derivations of this package to remove them?

Pairing LOGITECH K380 in Ubuntu 20.04

Posted: 06 Aug 2021 09:11 AM PDT

I connected to my new K380 without the pairing process using bluetooth manager. After that, using for some time, I notice that the keyboard was not answering anymore, and I've always to reconnect it to have it working.

I'd like to know if there is a commandline way to get it paired, because the bluetooth manager says that there is a "Pairing problem with the device".

I'm using Ubuntu 20.04 with a Dell Latitude e5450 and Intel Wireless 7265 (rev 59)


I finally solved this (almost 3 months later my first try). The steps are:

  1. Install bluetoothctl (in Ubuntu 20.04 it comes with the default install I think).

  2. In the terminal, run the command bluetoothctl and follow the commands bolded bellow:

$ bluetoothctl Agent registered [MX Vertical]# agent on Agent is already registered [MX Vertical]# scan on Discovery started [CHG] Controller DC:53:60:0E:0A:C8 Discovering: yes [CHG] Device 34:88:5D:EF:19:51 RSSI: -49 [CHG] Device 34:88:5D:EF:19:51 Class: 0x00002540 [CHG] Device 34:88:5D:EF:19:51 Icon: input-keyboard [CHG] Device 88:0F:10:87:00:F1 RSSI: -87

The MAC number of the keyboard is this one: 34:88:5D:EF:19:51 . Copy it! Then stop the scan: [MX Vertical]# scan off [CHG] Device 88:0F:10:87:00:F1 RSSI is nil [CHG] Device 34:88:5D:EF:19:51 RSSI is nil [CHG] Controller DC:53:60:0E:0A:C8 Discovering: no Discovery stopped

Trust the device with: [MX Vertical]# trust 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Trusted: yes Changing 34:88:5D:EF:19:51 trust succeeded

And pair it. Now the passkey shown in terminal (300892) must be typed in keyboard, and after that an ENTER should be pressed. It'll looks like this: [MX Vertical]# pair 34:88:5D:EF:19:51 Attempting to pair with 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Connected: yes [agent] Passkey: 300892 [agent] Passkey: 00892 [agent] Passkey: 0892 [agent] Passkey: 892 [agent] Passkey: 92 [agent] Passkey: 2 [agent] Passkey: [HIT ENTER NOW] [CHG] Device 34:88:5D:EF:19:51 Modalias: usb:v046DpB342d4201 [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001000-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001124-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes [CHG] Device 34:88:5D:EF:19:51 Paired: yes Pairing successful [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: no [CHG] Device 34:88:5D:EF:19:51 Connected: no [MX Vertical]# connect 34:88:5D:EF:19:51 Attempting to connect to 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Connected: yes Connection successful [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes

And finally it's working!

“VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path”

Posted: 06 Aug 2021 08:06 AM PDT

I'm getting the error:

Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

When trying to create a vm in terminal. I've uninstalled and reinstalled virtualbox, Ive confirmed VBoxManage exists.

Boot issues - GPU pci config reset

Posted: 06 Aug 2021 05:01 AM PDT

I have some issue to boot to Kali since i reboot the computer. I don't think i install some software, but i may be have run apt-get update since the last success boot.

With the kernel 4.9.0-Kali4-amd64, the system fails booting with the following message:

[ powerplay ] VBIOS did not find boot engine clock value in dependency table. Using Memory DPM level 0!

In recovery mode the system boot stop progressing at the following step:

admgpu 0000:0a:00.0: GPU pci config reset

I have a multi boot with windows 10 who is still working. The system is running on a HP laptop with intel i5-5200 cpu and ADM R5 m255 GPU

Any clue how i can solve my boot issue?

thanks

Why is passing the secrets via environmental variables considered "extremely insecure"?

Posted: 06 Aug 2021 09:34 AM PDT

Passing secrets (password) to a program via environmental variable is considered "extremely insecure" according to MySQL docs and as poor choice (from security aspect) across other resources.

I would like to know why - what is it that I'm missing? In the mentioned MySQL manual(I'm using this as an example), passing password via -p option in command line is considered as "insecure" and via env var as "extremely insecure", bold italic font.

I'm not an expert but I do know the fundamentals: simple ps command, even issued by unprivileged user reads every program alongside with command parameters while only the same user (and root, of course) may read environment of the process. So, only root and johndoe may read environment of the johndoe - started process, while hacked www-data script reads all via ps.

There must be some big deal here that I'm missing - so please explain me what am I missing?

My objective is to have a mean of transferring secret from one program to other, generally, non-interactive.

Very low volume audio through Bluetooth since networking restart

Posted: 06 Aug 2021 07:06 AM PDT

I'm running Debian 8, and I've been successfully using Pulseaudio/BlueZ to play audio through a Bluetooth speaker.

Today I restarted my networking stack in order to try and fix a WiFi problem, and since then the audio has been very, very quiet. I usually have the speaker on very low volume, but now I can't hear anything unless it's on full - and even then it's quiet.

The speaker is fine with other inputs.

Any help greatly appreciated!

Here is the sink from pacmd list-sinks:

index: 2  name: <bluez_sink.40_EF_4C_87_A6_85>  driver: <module-bluez5-device.c>  flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME   state: RUNNING  suspend cause:   priority: 9030  volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB          balance 0.00  base volume: 65536 / 100% / 0.00 dB  volume steps: 65537  muted: no  current latency: 32.82 ms  max request: 3 KiB  max rewind: 0 KiB  monitor source: 3  sample spec: s16le 2ch 44100Hz  channel map: front-left,front-right               Stereo  used by: 1  linked by: 1  fixed latency: 45.32 ms  card: 2 <bluez_card.40_EF_4C_87_A6_85>  module: 27  properties:      bluetooth.protocol = "a2dp_sink"      device.description = "AXiS X3"      device.string = "40:EF:4C:87:A6:85"      device.api = "bluez"      device.class = "sound"      device.bus = "bluetooth"      device.form_factor = "headset"      bluez.path = "/org/bluez/hci0/dev_40_EF_4C_87_A6_85"      bluez.class = "0x240404"      bluez.alias = "AXiS X3"      device.icon_name = "audio-headset-bluetooth"      device.intended_roles = "phone"  ports:      headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)          properties:    active port: <headset-output>  

And here is the only sink input:

1 sink input(s) available.  index: 1  driver: <protocol-native.c>  flags: START_CORKED   state: RUNNING  sink: 2 <bluez_sink.40_EF_4C_87_A6_85>  volume: front-left: 65535 / 100% / -0.00 dB,   front-right: 65535 / 100% / -0.00 dB          balance 0.00  muted: no  current latency: 982.00 ms  requested latency: 45.32 ms  sample spec: s16le 2ch 44100Hz  channel map: front-left,front-right               Stereo  resample method: (null)  module: 11  client: 16 <Spotify>  properties:      media.role = "music"      media.name = "Spotify"      application.name = "Spotify"      native-protocol.peer = "UNIX socket client"      native-protocol.version = "29"      application.process.id = "1555"      application.process.user = "richard"      application.process.host = "debian"      application.process.binary = "spotify"      window.x11.display = ":0.0"      application.language = "en_GB.utf8"      application.process.machine_id = "1b66e5d6e5fc45b981704645611058d0"      application.process.session_id = "1"      application.icon_name = "spotify-client"      module-stream-restore.id = "sink-input-by-media-role:music"  

Restrict size of buffer cache in Linux

Posted: 06 Aug 2021 09:30 AM PDT

Is there a way to tell the Linux kernel to only use a certain percentage of memory for the buffer cache? I know /proc/sys/vm/drop_caches can be used to clear the cache temporarily, but is there any permanent setting that prevents it from growing to more than e.g. 50% of main memory?

The reason I want to do this, is that I have a server running a Ceph OSD which constantly serves data from disk and manages to use up the entire physical memory as buffer cache within a few hours. At the same time, I need to run applications that will allocate a large amount (several 10s of GB) of physical memory. Contrary to popular belief (see the advice given on nearly all questions concerning the buffer cache), the automatic freeing up the memory by discarding clean cache entries is not instantaneous: starting my application can take up to a minute when the buffer cache is full (*), while after clearing the cache (using echo 3 > /proc/sys/vm/drop_caches) the same application starts nearly instantaneously.

(*) During this minute of startup time, the application is faulting in new memory but spends 100% of its time in the kernel, according to Vtune in a function called pageblock_pfn_to_page. This function seems to be related to memory compaction needed to find huge pages, which leads me to believe that actually fragmentation is the problem.

Getting conflict errors when runnin yum update

Posted: 06 Aug 2021 06:04 AM PDT

I'm truing to run yum update, and keep getting errors about conflicts. I must have accidentally interrupted an update at some point, but I don't know when and how.

I've tried —skip-broken, but it doesn't really help me, because I want to update the parts that now refuse to update.

Also, I've tried "yum remove util-linux", but then when I tried to re-install it, it didn't let me. Due to conflict errors much like what I'm getting now. (So I reverted to a backup volume, hence back on square 1).

Any ideas of how I can solve this?

yum update  Loaded plugins: priorities, update-motd, upgrade-helper  amzn-main/latest                                                                                                                                                                   | 2.1 kB     00:00       amzn-updates/latest                                                                                                                                                                | 2.3 kB     00:00       Resolving Dependencies  --> Running transaction check  ---> Package aws-amitools-ec2.noarch 0:1.5.2-0.0.amzn1 will be updated  ---> Package aws-amitools-ec2.noarch 0:1.5.3-0.0.amzn1 will be an update  ---> Package aws-apitools-as.noarch 0:1.0.61.4-1.0.amzn1 will be updated  ---> Package aws-apitools-as.noarch 0:1.0.61.5-1.0.amzn1 will be an update  ---> Package aws-apitools-ec2.noarch 0:1.6.13.0-1.1.amzn1 will be updated  ---> Package aws-apitools-ec2.noarch 0:1.7.1.0-1.2.amzn1 will be an update  ---> Package aws-apitools-elb.noarch 0:1.0.34.0-1.0.amzn1 will be updated  ---> Package aws-apitools-elb.noarch 0:1.0.35.0-1.0.amzn1 will be an update  ---> Package aws-cli.noarch 0:1.3.6-1.0.amzn1 will be updated  ---> Package aws-cli.noarch 0:1.3.24-1.0.amzn1 will be an update  ---> Package cloud-init.noarch 0:0.5.15-77.amzn1 will be updated  ---> Package cloud-init.noarch 0:0.7.2-7.20.amzn1 will be updated  ---> Package cloud-init.noarch 0:0.7.2-7.27.amzn1 will be an update  ---> Package curl.x86_64 0:7.35.0-2.42.amzn1 will be updated  ---> Package curl.x86_64 0:7.36.0-2.44.amzn1 will be updated  ---> Package curl.x86_64 0:7.36.0-2.45.amzn1 will be an update  ---> Package cyrus-sasl.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.10.amzn1 will be updated  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.10.amzn1 will be updated  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package ec2-net-utils.noarch 0:0.4-1.20.amzn1 will be updated  ---> Package ec2-net-utils.noarch 0:0.4-1.22.amzn1 will be an update  ---> Package ec2-utils.noarch 0:0.4-1.20.amzn1 will be updated  ---> Package ec2-utils.noarch 0:0.4-1.22.amzn1 will be an update  ---> Package elfutils-libelf.x86_64 0:0.152-1.12.amzn1 will be updated  ---> Package elfutils-libelf.x86_64 0:0.157-2.14.amzn1 will be updated  ---> Package elfutils-libelf.x86_64 0:0.158-3.16.amzn1 will be an update  ---> Package file.x86_64 0:5.11-13.14.amzn1 will be updated  ---> Package file.x86_64 0:5.11-13.16.amzn1 will be updated  ---> Package file.x86_64 0:5.19-1.18.amzn1 will be an update  ---> Package file-libs.x86_64 0:5.11-13.14.amzn1 will be updated  ---> Package file-libs.x86_64 0:5.11-13.16.amzn1 will be updated  ---> Package file-libs.x86_64 0:5.19-1.18.amzn1 will be an update  ---> Package glibc.x86_64 0:2.12-1.132.45.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-common.x86_64 0:2.12-1.132.45.amzn1 will be updated  ---> Package glibc-common.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-common.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-devel.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-devel.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-headers.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-headers.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package gnupg2.x86_64 0:2.0.22-1.24.amzn1 will be updated  ---> Package gnupg2.x86_64 0:2.0.24-1.25.amzn1 will be an update  ---> Package httpd.x86_64 0:2.2.27-1.2.amzn1 will be updated  ---> Package httpd.x86_64 0:2.2.27-1.3.amzn1 will be an update  ---> Package httpd-tools.x86_64 0:2.2.27-1.2.amzn1 will be updated  ---> Package httpd-tools.x86_64 0:2.2.27-1.3.amzn1 will be an update  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-66.1.13.1.62.amzn1 will be updated  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-66.1.13.1.63.amzn1 will be updated  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-67.1.13.4.65.amzn1 will be an update  ---> Package kernel.x86_64 0:3.10.48-55.140.amzn1 will be installed  ---> Package kernel-headers.x86_64 0:3.10.35-43.137.amzn1 will be updated  ---> Package kernel-headers.x86_64 0:3.10.48-55.140.amzn1 will be an update  ---> Package libblkid.x86_64 0:2.17.2-13.17.amzn1 will be updated  ---> Package libblkid.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libblkid.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libcurl.x86_64 0:7.35.0-2.42.amzn1 will be updated  ---> Package libcurl.x86_64 0:7.36.0-2.44.amzn1 will be updated  ---> Package libcurl.x86_64 0:7.36.0-2.45.amzn1 will be an update  ---> Package libmount.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libmount.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libpwquality.x86_64 0:1.2.3-1.2.amzn1 will be updated  ---> Package libpwquality.x86_64 0:1.2.3-1.5.amzn1 will be an update  ---> Package libtasn1.x86_64 0:2.3-3.4.amzn1 will be updated  ---> Package libtasn1.x86_64 0:2.3-6.6.amzn1 will be an update  ---> Package libuuid.x86_64 0:2.17.2-13.17.amzn1 will be updated  ---> Package libuuid.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libuuid.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libxml2.x86_64 0:2.9.1-1.1.28.amzn1 will be updated  ---> Package libxml2.x86_64 0:2.9.1-1.1.29.amzn1 will be updated  ---> Package libxml2.x86_64 0:2.9.1-1.1.31.amzn1 will be an update  ---> Package mod_ssl.x86_64 1:2.2.27-1.2.amzn1 will be updated  ---> Package mod_ssl.x86_64 1:2.2.27-1.3.amzn1 will be an update  ---> Package mysql55.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-common.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-common.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-common.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-libs.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-libs.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-libs.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-server.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-server.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-server.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package nspr.x86_64 0:4.10.2-1.19.amzn1 will be updated  ---> Package nspr.x86_64 0:4.10.4-1.22.amzn1 will be an update  ---> Package nss.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-softokn.x86_64 0:3.14.3-9.15.amzn1 will be updated  ---> Package nss-softokn.x86_64 0:3.16.0-1.19.amzn1 will be an update  ---> Package nss-softokn-freebl.x86_64 0:3.14.3-9.15.amzn1 will be updated  ---> Package nss-softokn-freebl.x86_64 0:3.16.0-1.19.amzn1 will be an update  ---> Package nss-sysinit.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss-sysinit.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-tools.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss-tools.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-util.x86_64 0:3.15.3-1.18.amzn1 will be updated  ---> Package nss-util.x86_64 0:3.15.3-1.19.amzn1 will be updated  ---> Package nss-util.x86_64 0:3.16.0-1.22.amzn1 will be an update  ---> Package openssh.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssh-clients.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh-clients.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssh-server.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh-server.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssl.x86_64 1:1.0.1e-4.55.amzn1 will be updated  ---> Package openssl.x86_64 1:1.0.1g-1.69.amzn1 will be updated  ---> Package openssl.x86_64 1:1.0.1i-1.78.amzn1 will be an update  ---> Package pam.x86_64 0:1.1.1-13.20.amzn1 will be updated  ---> Package pam.x86_64 0:1.1.8-1.25.amzn1 will be updated  ---> Package pam.x86_64 0:1.1.8-9.29.amzn1 will be an update  ---> Package python-boto.noarch 0:2.27.0-1.0.amzn1 will be updated  ---> Package python-boto.noarch 0:2.32.0-1.0.amzn1 will be an update  ---> Package python-botocore.noarch 0:0.40.0-1.0.amzn1 will be updated  ---> Package python-botocore.noarch 0:0.58.0-1.0.amzn1 will be an update  ---> Package python-jmespath.noarch 0:0.3.1-1.0.amzn1 will be updated  ---> Package python-jmespath.noarch 0:0.4.1-1.0.amzn1 will be an update  ---> Package python-simplejson.x86_64 0:3.3.0-1.5.amzn1 will be updated  ---> Package python-simplejson.x86_64 0:3.5.3-1.7.amzn1 will be an update  ---> Package readline.x86_64 0:6.0-4.12.amzn1 will be updated  ---> Package readline.x86_64 0:6.2-6.13.amzn1 will be updated  ---> Package readline.x86_64 0:6.2-9.14.amzn1 will be an update  ---> Package util-linux.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package util-linux.x86_64 0:2.23.2-16.22.amzn1 will be obsoleting  ---> Package util-linux-ng.x86_64 0:2.17.2-13.17.amzn1 will be obsoleted  --> Processing Conflict: glibc-2.17-55.84.amzn1.x86_64 conflicts audit < 2.3.0  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts coreutils < 8.20  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Finished Dependency Resolution  --> Running transaction check  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package kernel.x86_64 0:3.4.76-65.111.amzn1 will be erased  --> Processing Conflict: glibc-2.17-55.84.amzn1.x86_64 conflicts audit < 2.3.0  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts coreutils < 8.20  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Finished Dependency Resolution  Error: util-linux conflicts with coreutils-8.4-31.20.amzn1.x86_64  Error: util-linux conflicts with sysvinit-2.87-4.dsf.10.amzn1.x86_64  Error: util-linux conflicts with upstart-0.6.5-12.10.amzn1.x86_64  Error: glibc conflicts with audit-2.2-2.17.amzn1.x86_64   You could try using --skip-broken to work around the problem  ** Found 113 pre-existing rpmdb problem(s), 'yum check' output follows:  apr-1.5.0-2.11.amzn1.x86_64 is a duplicate with apr-1.4.6-1.10.amzn1.x86_64  audit-2.3.2-3.19.amzn1.x86_64 is a duplicate with audit-2.2-2.17.amzn1.x86_64  audit-libs-2.3.2-3.19.amzn1.x86_64 is a duplicate with audit-libs-2.2-2.17.amzn1.x86_64  ca-certificates-2013.1.94-65.0.9.amzn1.noarch is a duplicate with ca-certificates-2012.1.95-3.12.amzn1.noarch  cloud-init-0.7.2-7.20.amzn1.noarch is a duplicate with cloud-init-0.5.15-77.amzn1.noarch  coreutils-8.21-13.31.amzn1.x86_64 is a duplicate with coreutils-8.4-31.20.amzn1.x86_64  cronie-anacron-1.4.4-7.5.amzn1.x86_64 has missing requires of cronie = ('0', '1.4.4', '7.5.amzn1')  cronie-anacron-1.4.4-12.6.amzn1.x86_64 is a duplicate with cronie-anacron-1.4.4-7.5.amzn1.x86_64  cryptsetup-1.6.2-2.11.amzn1.x86_64 is a duplicate with cryptsetup-1.5.1-1.3.amzn1.x86_64  cryptsetup-libs-1.6.2-2.11.amzn1.x86_64 is a duplicate with cryptsetup-libs-1.5.1-1.3.amzn1.x86_64  curl-7.36.0-2.44.amzn1.x86_64 is a duplicate with curl-7.35.0-2.42.amzn1.x86_64  cyrus-sasl-lib-2.1.23-13.13.amzn1.x86_64 is a duplicate with cyrus-sasl-lib-2.1.23-13.10.amzn1.x86_64  cyrus-sasl-plain-2.1.23-13.13.amzn1.x86_64 is a duplicate with cyrus-sasl-plain-2.1.23-13.10.amzn1.x86_64  db4-4.7.25-18.11.amzn1.x86_64 is a duplicate with db4-4.7.25-17.10.amzn1.x86_64  db4-utils-4.7.25-18.11.amzn1.x86_64 is a duplicate with db4-utils-4.7.25-17.10.amzn1.x86_64  1:dbus-1.6.12-5.25.amzn1.x86_64 is a duplicate with 1:dbus-1.2.24-7.16.amzn1.x86_64  1:dbus-libs-1.6.12-5.25.amzn1.x86_64 is a duplicate with 1:dbus-libs-1.2.24-7.16.amzn1.x86_64  dejavu-fonts-common-2.33-5.8.amzn1.noarch is a duplicate with dejavu-fonts-common-2.30-2.4.amzn1.noarch  dejavu-sans-fonts-2.33-5.8.amzn1.noarch is a duplicate with dejavu-sans-fonts-2.30-2.4.amzn1.noarch  dejavu-serif-fonts-2.33-5.8.amzn1.noarch is a duplicate with dejavu-serif-fonts-2.30-2.4.amzn1.noarch  12:dhclient-4.1.1-38.P1.19.amzn1.x86_64 is a duplicate with 12:dhclient-4.1.1-34.P1.18.amzn1.x86_64  12:dhcp-common-4.1.1-38.P1.19.amzn1.x86_64 is a duplicate with 12:dhcp-common-4.1.1-34.P1.18.amzn1.x86_64  e2fsprogs-libs-1.42.8-2.29.amzn1.x86_64 is a duplicate with e2fsprogs-libs-1.42.3-3.17.amzn1.x86_64  elfutils-libelf-0.157-2.14.amzn1.x86_64 is a duplicate with elfutils-libelf-0.152-1.12.amzn1.x86_64  file-5.11-13.16.amzn1.x86_64 is a duplicate with file-5.11-13.14.amzn1.x86_64  file-libs-5.11-13.16.amzn1.x86_64 is a duplicate with file-libs-5.11-13.14.amzn1.x86_64  glib2-2.36.3-2.14.amzn1.x86_64 is a duplicate with glib2-2.22.5-7.11.amzn1.x86_64  glibc-2.17-36.81.amzn1.x86_64 has installed conflicts audit < ('0', '2.3.0', None): audit-2.2-2.17.amzn1.x86_64  glibc-2.17-36.81.amzn1.x86_64 is a duplicate with glibc-2.12-1.132.45.amzn1.x86_64  glibc-common-2.17-36.81.amzn1.x86_64 is a duplicate with glibc-common-2.12-1.132.45.amzn1.x86_64  groff-1.22.2-6.10.amzn1.x86_64 is a duplicate with groff-1.18.1.4-21.7.amzn1.x86_64  groff-base-1.22.2-6.10.amzn1.x86_64 has installed conflicts groff < ('0', '1.22.2', None): groff-1.18.1.4-21.7.amzn1.x86_64  grubby-7.0.15-5.7.amzn1.x86_64 is a duplicate with grubby-7.0.15-3.6.amzn1.x86_64  gzip-1.5-4.16.amzn1.x86_64 is a duplicate with gzip-1.3.12-19.9.amzn1.x86_64  hwdata-0.233-9.1.16.amzn1.noarch is a duplicate with hwdata-0.233-7.9.14.amzn1.noarch  info-5.1-1.9.amzn1.x86_64 is a duplicate with info-4.13a-8.8.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 has installed conflicts util-linux-ng < ('0', '2.23', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 has installed conflicts util-linux < ('0', '2.23', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 is a duplicate with initscripts-9.03.38-1.22.amzn1.x86_64  1:java-1.6.0-openjdk-1.6.0.0-66.1.13.1.63.amzn1.x86_64 is a duplicate with 1:java-1.6.0-openjdk-1.6.0.0-66.1.13.1.62.amzn1.x86_64  kpartx-0.4.9-72.7.amzn1.x86_64 is a duplicate with kpartx-0.4.9-64.6.amzn1.x86_64  ksh-20120801-10.12.amzn1.x86_64 is a duplicate with ksh-20100621-19.11.amzn1.x86_64  libblkid-2.23.2-6.21.amzn1.x86_64 is a duplicate with libblkid-2.17.2-13.17.amzn1.x86_64  libcom_err-1.42.8-2.29.amzn1.x86_64 is a duplicate with libcom_err-1.42.3-3.17.amzn1.x86_64  libcurl-7.36.0-2.44.amzn1.x86_64 is a duplicate with libcurl-7.35.0-2.42.amzn1.x86_64  libgcrypt-1.5.3-1.14.amzn1.x86_64 is a duplicate with libgcrypt-1.4.5-9.12.amzn1.x86_64  14:libpcap-1.4.0-1.20130826git2dbcaa1.10.amzn1.x86_64 is a duplicate with 14:libpcap-1.0.0-6.20091201git117cb5.9.amzn1.x86_64  libss-1.42.8-2.29.amzn1.x86_64 is a duplicate with libss-1.42.3-3.17.amzn1.x86_64  libtool-ltdl-2.4.2-18.4.8.2.21.amzn1.x86_64 is a duplicate with libtool-ltdl-2.2.10-4.6.3.14.amzn1.x86_64  libudev-173-4.13.amzn1.x86_64 is a duplicate with libudev-173-4.12.amzn1.x86_64  libuuid-2.23.2-6.21.amzn1.x86_64 is a duplicate with libuuid-2.17.2-13.17.amzn1.x86_64  libxml2-2.9.1-1.1.29.amzn1.x86_64 is a duplicate with libxml2-2.9.1-1.1.28.amzn1.x86_64  libxslt-1.1.28-3.8.amzn1.x86_64 is a duplicate with libxslt-1.1.26-2.7.amzn1.x86_64  libyaml-0.1.6-1.6.amzn1.x86_64 is a duplicate with libyaml-0.1.4-6.5.amzn1.x86_64  mdadm-3.2.6-7.29.amzn1.x86_64 is a duplicate with mdadm-3.2.5-4.23.amzn1.x86_64  mysql-5.5-1.6.amzn1.noarch is a duplicate with mysql-5.5-1.3.amzn1.noarch  mysql-server-5.5-1.6.amzn1.noarch is a duplicate with mysql-server-5.5-1.3.amzn1.noarch  mysql55-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-5.5.34-1.40.amzn1.x86_64  mysql55-common-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-common-5.5.34-1.40.amzn1.x86_64  mysql55-libs-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-libs-5.5.34-1.40.amzn1.x86_64  mysql55-server-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-server-5.5.34-1.40.amzn1.x86_64  nss-util-3.15.3-1.19.amzn1.x86_64 is a duplicate with nss-util-3.15.3-1.18.amzn1.x86_64  numactl-2.0.7-8.11.amzn1.x86_64 is a duplicate with numactl-2.0.7-6.10.amzn1.x86_64  1:openssl-1.0.1g-1.69.amzn1.x86_64 is a duplicate with 1:openssl-1.0.1e-4.55.amzn1.x86_64  pam-1.1.8-1.25.amzn1.x86_64 is a duplicate with pam-1.1.1-13.20.amzn1.x86_64  4:perl-5.16.3-280.36.amzn1.x86_64 is a duplicate with 4:perl-5.10.1-136.21.amzn1.x86_64  perl-DBD-MySQL-4.023-2.16.amzn1.x86_64 is a duplicate with perl-DBD-MySQL-4.020-2.8.amzn1.x86_64  perl-DBI-1.627-1.7.amzn1.x86_64 is a duplicate with perl-DBI-1.609-4.4.amzn1.x86_64  1:perl-Digest-SHA-5.85-1.4.amzn1.x86_64 is a duplicate with 1:perl-Digest-SHA-5.47-136.21.amzn1.x86_64  perl-Digest-SHA1-2.13-7.6.amzn1.x86_64 is a duplicate with perl-Digest-SHA1-2.12-2.4.amzn1.x86_64  perl-Encode-Locale-1.03-4.7.amzn1.noarch is a duplicate with perl-Encode-Locale-1.02-3.1.amzn1.noarch  perl-HTML-Tagset-3.20-14.6.amzn1.noarch is a duplicate with perl-HTML-Tagset-3.20-4.4.amzn1.noarch  perl-LWP-MediaTypes-6.02-1.8.amzn1.noarch is a duplicate with perl-LWP-MediaTypes-6.01-3.3.amzn1.noarch  1:perl-Module-Pluggable-4.8-1.2.amzn1.noarch is a duplicate with 1:perl-Module-Pluggable-3.90-136.21.amzn1.x86_64  perl-Net-LibIDN-0.12-13.5.amzn1.x86_64 is a duplicate with perl-Net-LibIDN-0.12-3.2.amzn1.x86_64  1:perl-Pod-Escapes-1.04-280.36.amzn1.noarch is a duplicate with 1:perl-Pod-Escapes-1.04-136.21.amzn1.x86_64  1:perl-Pod-Simple-3.28-3.5.amzn1.noarch is a duplicate with 1:perl-Pod-Simple-3.13-136.21.amzn1.x86_64  1:perl-TimeDate-2.30-1.6.amzn1.noarch is a duplicate with 1:perl-TimeDate-1.16-11.1.4.amzn1.noarch  perl-URI-1.60-8.7.amzn1.noarch is a duplicate with perl-URI-1.40-2.5.amzn1.noarch  perl-XML-NamespaceSupport-1.11-9.7.amzn1.noarch is a duplicate with perl-XML-NamespaceSupport-1.10-3.5.amzn1.noarch  4:perl-libs-5.16.3-280.36.amzn1.x86_64 is a duplicate with 4:perl-libs-5.10.1-136.21.amzn1.x86_64  perl-podlators-2.5.1-2.7.amzn1.noarch has installed conflicts perl < ('4', '5.16.1', '234'): 4:perl-5.10.1-136.21.amzn1.x86_64  3:perl-version-0.99.02-2.5.amzn1.x86_64 is a duplicate with 3:perl-version-0.77-136.21.amzn1.x86_64  psmisc-22.20-6.11.amzn1.x86_64 is a duplicate with psmisc-22.6-15.8.amzn1.x86_64  pyliblzma-0.5.3-3.6.amzn1.x86_64 is a duplicate with pyliblzma-0.5.3-3.4.amzn1.x86_64  python26-2.6.9-1.46.amzn1.x86_64 is a duplicate with python26-2.6.9-1.43.amzn1.x86_64  python26-libs-2.6.9-1.46.amzn1.x86_64 is a duplicate with python26-libs-2.6.9-1.43.amzn1.x86_64  readline-6.2-6.13.amzn1.x86_64 is a duplicate with readline-6.0-4.12.amzn1.x86_64  rpm-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-4.11.1-3.49.amzn1.x86_64  rpm-build-libs-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-build-libs-4.11.1-3.49.amzn1.x86_64  rpm-libs-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-libs-4.11.1-3.49.amzn1.x86_64  rpm-python-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-python-4.11.1-3.49.amzn1.x86_64  rsyslog-5.8.10-8.25.amzn1.x86_64 is a duplicate with rsyslog-5.8.10-7.24.amzn1.x86_64  sqlite-3.7.17-1.9.amzn1.x86_64 is a duplicate with sqlite-3.6.20-1.8.amzn1.x86_64  system-release-2014.03-2.0.noarch is a duplicate with system-release-2013.09-1.0.noarch  sysvinit-2.87-5.dsf.14.amzn1.x86_64 has installed conflicts util-linux < ('0', '2.23.2', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  sysvinit-2.87-5.dsf.14.amzn1.x86_64 is a duplicate with sysvinit-2.87-4.dsf.10.amzn1.x86_64  tcp_wrappers-7.6-75.11.amzn1.x86_64 is a duplicate with tcp_wrappers-7.6-57.9.amzn1.x86_64  tcp_wrappers-libs-7.6-75.11.amzn1.x86_64 is a duplicate with tcp_wrappers-libs-7.6-57.9.amzn1.x86_64  tzdata-2013i-2.23.amzn1.noarch is a duplicate with tzdata-2013c-2.18.amzn1.noarch  tzdata-java-2013i-2.23.amzn1.noarch is a duplicate with tzdata-java-2013c-2.18.amzn1.noarch  udev-173-4.13.amzn1.x86_64 is a duplicate with udev-173-4.12.amzn1.x86_64  upstart-0.6.5-13.3.13.amzn1.x86_64 is a duplicate with upstart-0.6.5-12.10.amzn1.x86_64  util-linux-2.23.2-6.21.amzn1.x86_64 has installed conflicts coreutils < ('0', '8.20', None): coreutils-8.4-31.20.amzn1.x86_64  util-linux-2.23.2-6.21.amzn1.x86_64 has installed conflicts sysvinit < ('0', '2.87', '5'): upstart-0.6.5-12.10.amzn1.x86_64, sysvinit-2.87-4.dsf.10.amzn1.x86_64  2:vim-common-7.4.027-2.28.amzn1.x86_64 is a duplicate with 2:vim-common-7.2.411-1.8.17.amzn1.x86_64  2:vim-minimal-7.4.027-2.28.amzn1.x86_64 is a duplicate with 2:vim-minimal-7.2.411-1.8.17.amzn1.x86_64  xz-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  xz-libs-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-libs-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  xz-lzma-compat-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-lzma-compat-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  yum-3.4.3-137.51.amzn1.noarch is a duplicate with yum-3.4.3-111.46.amzn1.noarch  yum-plugin-priorities-1.1.31-18.17.amzn1.noarch is a duplicate with yum-plugin-priorities-1.1.31-17.16.amzn1.noarch  yum-plugin-upgrade-helper-1.1.31-18.17.amzn1.noarch is a duplicate with yum-plugin-upgrade-helper-1.1.31-17.16.amzn1.noarch  

How can I add an application to the GNOME window manager?

Posted: 06 Aug 2021 09:30 AM PDT

The GNOME on-board documentation covers only the things anyone can easily guess. I have an application for that I can only start from the command line. Not that I mind using a terminal but ...

Anyway, how do I add the command (and preferably a nice logo) to GNOME WM?

Linux (RedHat) `sudo su -l <<user_acct>>` does not source profile

Posted: 06 Aug 2021 05:52 AM PDT

As stated, having trouble with loading the default profile of <<user_acct>> when doing sudo su -l <<user_acct>>.

Inside .profile,

if [ -r "${HOME}/.profile.custom" ]; then      . "${HOME}/.profile.custom"  fi  

From what I've read (for example, answers similar to this one), -l should have triggered a login shell and therefore sourced .profile, but it doesn't seem to be working because the environment variables set in .profile.custom is not there (vs. if I just ran . .profile, they show up.

Revised question: Any thoughts why or how to get around this issue?

No way to record a live stream to WebM using ffmpeg?

Posted: 06 Aug 2021 09:05 AM PDT

I'm streaming from an mp4 source and so far I've managed to save clips as ogg (video: libtheora, audio: flac), but I'd like to save them in the WebM format. Unfortunately, WebM demands libvorbis for audio and when I try to do that:

$ ffmpeg -t 60 -rtsp_transport udp -i rtsp://192.168.1.142/video.mp4 -vcodec libvpx -acodec libvorbis -f webm test.webm  ffmpeg version 0.10.5 Copyright (c) 2000-2012 the FFmpeg developers    built on Oct  4 2012 19:17:43 with gcc 4.7.2 20120921 (Red Hat 4.7.2-2)    configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect    libavutil      51. 35.100 / 51. 35.100    libavcodec     53. 61.100 / 53. 61.100    libavformat    53. 32.100 / 53. 32.100    libavdevice    53.  4.100 / 53.  4.100    libavfilter     2. 61.100 /  2. 61.100    libswscale      2.  1.100 /  2.  1.100    libswresample   0.  6.100 /  0.  6.100    libpostproc    52.  0.100 / 52.  0.100  [rtsp @ 0xc62ec0] Estimating duration from bitrate, this may be inaccurate  Input #0, rtsp, from 'rtsp://192.168.1.142/video.mp4':    Metadata:      title           : QStream      comment         : QStreaming Media    Duration: N/A, start: 0.000000, bitrate: N/A      Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 90k tbn, 30 tbc      Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s  File 'test.webm' already exists. Overwrite ? [y/N] y  w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:  [libvpx @ 0xc60b60] v1.0.0  [libvorbis @ 0xc61da0] Unable to set CBR to 128000: not supported  [libvorbis @ 0xc61da0] oggvorbis_encode_init failed  Output #0, webm, to 'test.webm':    Metadata:      title           : QStream      comment         : QStreaming Media      Stream #0:0: Video: vp8, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 200 kb/s, 90k tbn, 30 tbc      Stream #0:1: Audio: vorbis, 8000 Hz, 1 channels, s16, 128 kb/s  Stream mapping:    Stream #0:0 -> #0:0 (mpeg4 -> libvpx)    Stream #0:1 -> #0:1 (pcm_mulaw -> libvorbis)  Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height  

The only way I found to encode audio in a WebM file using ffmpeg is here, but that requires two passes, so I can't do it with a live stream. Any clues?

No comments:

Post a Comment