Hot answers tagged

6

The -name test only matches the last path component. To match something like abc/def you will need -path: $ mkdir -p somedir/otherdir/abc/def/ghi $ find somedir -path '*/abc/def' somedir/otherdir/abc/def


4

When vm.swappiness is set to 100, the page cache and swap are considered equally when handling memory pressure. Values less than 100 tell the kernel to consider swap to be more expensive than the page cache; thus when it needs to free pages, it will try to free pages from the page cache rather than use swap. The lower the value, the greater the cost of swap. ...


3

According to public Whois lookup information, 45.52.*.* network segment belongs to Frontier Communications of America, Inc. Since you are receiving invalid responses from all over that segment, it looks like avahi-daemon has not been restricted from accepting packets from outside your own network and it's responding to random queries from all the other ...


3

If it's a real server, it has a BMC. You should at the very least examine the BMCs event log. That will tell you at least some information about why the server disappeared. (Consider that syslog is just a normal file created by a daemon - that means in addition to hardware problems, the daemon could have died, or the filesystem got confused. That's why ...


3

8.1.2 is the latest version that's available in the RHEL repos for RHEL 7.6 (and also RHEL 7.8) for the corresponding version of Python which is 2.7. Version 19.3.1 is available but it's for Python 3.8. You can see it available if you enable the necessary RHEL repos and search for the package with yum: subscription-manager repos enable rhel* yum list ...


3

You are doing nothing wrong, 8.1.2 is the newest version of pip available in the EPEL 7 repo. RHEL/CentOS 7 usually doesn't get new versions of software, only bugfixes, and same applies to EPEL. There are some CVE fixes and other recent patches in the pip EPEL repo so I'd assume it's being actively maintained and safe to use.


3

You can parse lspci’s output to determine which drivers are currently in use (not just installed): lspci -vmmk | awk '/^$/ { network = 0 } /(Ethernet|Network) controller/ { network = 1 } network && /Driver:/ { print $2 }' Once you have the driver names, modinfo will give you more information, including the driver version: sudo modinfo i40e | grep '^...


2

So we have just had this issue on install and uninstall (and it all worked fine yesterday). Looking at the error code you see: https://download.docker.com/linux/centos/7Server/x86_64/nightly/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found And plugging this url into a browser indeed 404s... it looks to me like the '/7Server/' bit has an extra ...


2

This document seems to say that multiuser was added in cifs-utils 4.7: Originally by Igor Druzhinin in cifs-utils 4.7 and overhauled in 5.3. Kernel support in 3.3 The reference was rather oblique. Corroborating information seemed needed. Version control may indicate the same as 4.7 is where the man page was added: manpage: add mount.cifs manpage entry for ...


2

The file that is causing this behavior is vte.sh in /etc/profile.d/: One aspect of VTE configuration is the use of /etc/profile.d/vte.sh. The VTE uses this script to override the PROMPT_COMMAND in order to feed itself additional information via terminal control codes. In particular, this script is used to tell the VTE the current directory of the shell. ...


2

The /etc/environment file is not evaluated as a shell script. To quote from its man page (rearranged for clarity): The configuration files contain a list of "KEY=VALUE" environment variable assignments, separated by newlines. The right hand side of these assignments may reference previously defined environment variables, using the "${...


2

I found my own answer. This works on RHEL and on CentOS: rpm -E %{rhel}


2

With GNU grep (the implementation found on rhel) built with PCRE support: ps -Ao pid= -o args= | grep -Pom1 '^\s*\K\d+(?= \Q/usr/ud/bin/udt PHANTOM PHA-WRM-EXPIRE\E)' Where -P switches to Perl-like regular expressions (for \s, \K, \d, (?=...), \Q, \E all perl like extensions). -o tells grep to only output the matched portion -m1 tells grep to only output ...


2

Those avahi-daemon service could be the reason for the machine unexpected shutdown? No, 100%. Considering nothing had been logged just before the server went down, it could most likely indicate a hardware failure, power loss or someone simply pressed the reset button. If your server contains an IPMI/BMC chip you can check its hardware log using ipmitool. ...


2

Do not delete other repo files. Just make sure that each entry /etc/yum.repos.d/*, for which you do not want to be used any more, has a line enabled=0. Then you add entries as you already did. My example of such repo file looks like this: [c8-disk-BaseOS] name=CentOS-BaseOS- - Media baseurl=file:///CentOS/BaseOS gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/...


2

This is used by programs which comply with the FreeDesktop.org Trash specification. rm doesn’t follow this specification, but many current desktop environments do: instead of deleting files outright, they move them to the appropriate trash directory, thus allowing them to be “undeleted” if necessary. On the command-line, one tool which can be used is gio ...


1

The installation logs can be found in /var/log/anaconda/. Source.


1

By default RHEL 7 contains gcc 4.8 which doesn't support C++14, you need to use Developer Toolset 7 from Software collections. Official documentation is available here or check this answer with shorter version on stackoverflow.


1

mount -a This command is redundant. Swap is not "mounted" it's either used or not used. swapoff /swapfile-additional It's currently the only valid way. Preallocated files may not always work. then what is the maz swap that we can use from total memory ? It's hard to understand what you really mean.


1

You need something that monitors your sshd server logs and adds the client IP address to the banned list when the number of failures reaches the threshold level. fail2ban is the usual tool for this. More specifically, you'll need a firewalld-aware backend component for fail2ban, i.e. fail2ban-firewalld. Here is a tutorial for RHEL/CentOS 7: https://devops....


1

In your scenario, the vgexport/vgimport is not really necessary, precisely because you already know the existing VG names in the new machine. For renaming a VG on the old system, you'll most likely need to unmount and deactivate it first, and since there is no VG name conflict there, you don't have to use the VG UUID instead of the old VG name (although you ...


1

If you look at man yum.conf, there is this option: timeout: Number of seconds to wait for a connection before timing out. Defaults to 30 seconds. This may be too short of a time for extremely overloaded sites. According to the documentation, you can set timeout in either the [main] section of yum.conf to apply globally or the [repositories] section to set ...


1

By default, auditd in all versions of Red Hat Enterprise Linux rotates its own log files automatically when they reach a certain size, as determined by the max_log_file setting in auditd.conf (which defaults to 6 megabytes) Replacing auto-rotation based on size with auto-rotation based on time Disable rotation in /etc/audit/auditd.conf so that: ...


1

If you have a device with two wifi adapters, and you want to use the second one, then you should do the following commands. I used this with my AWS DeepLens, since the internal WiFi antenna is quite basic, but my USB WiFi adapter is very very good: # Find the device name (such as wlan0) of your good adapter ip a ifconfig # Ensure that NetworkManager sees ...


1

You could check the modification timestamps of the files in that directory, looking for files modified less than 24 hours ago. If you find none, then generate an alert. #!/bin/sh MONITOR_DIR=/some/directory NUM_NEW_FILES=$(find "$MONITOR_DIR" -mtime -1 | wc -l) if [ $NUM_NEW_FILES -eq 0 ] then # change this to generate an alert of preferred ...


Only top voted, non community-wiki answers of a minimum length are eligible