Make systemd service understand change in configuration file Posted: 11 Feb 2022 03:06 AM PST I have a systemd service that more or less is like this: [Service] ExecStart=/usr/local/bin/binary subcommand User=my-user Group=my-group EnvironmentFile=/etc/my-service/config I am changing the contents of /etc/my-service/config Should I run daemon-reload or just reload the service? Note that I don't have an ExecReload directive on my unit file; does this affect the systemctl reload my-service 's behavior? |
calling vim with mpiexec says "Warning: Output is not to a terminal / Warning: Input is not from a terminal" Posted: 11 Feb 2022 03:03 AM PST My question is a bit technical. For specific reason, I need to call vim after mpiexec. Example : mpiexec -n 1 vim mytext.txt But this gives the following warning message: Vim: Warning: Output is not to a terminal Vim: Warning: Input is not from a terminal And then, vim does not behave naturally, my input commands are not well interpreted in the editor, and things are not as if I had done simply: vim mytext.txt Any idea on how to redirect correctly input/output from/to my launching terminal in order to be able to use vim after mpiexec ? Actually, the final goal is to debug in parallel using gdb on a specific proc and to edit functions with vim editor from gdb. Example : mpiexec -s 1 myprog : gdb myprog So I am starting my program "myprog" on two processes, using gdb on the second one (which is proc 1), and redirecting stdin to proc 1 (thanks to -s 1 [see mpiexec -help]). But then, if I want to edit a function with vim editor in gdb, I will face the same problems : Vim: Warning: Output is not to a terminal Vim: Warning: Input is not from a terminal A quick solution would be to start an xterm window, but I want to avoid that approach: mpiexec myprog : xterm -e gdb myprog Thanks for your help. Here is my Linux distribution: NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" |
systemd service doesn't work anymore Posted: 11 Feb 2022 02:22 AM PST I have an executable secretserviced which I want users be able to make a user service from it. I put this executable in /usr/bin and make a Unit file (secretserviced.service ) as below and putting it at /etc/systemd/user : [Unit] Description=Service to keep secrets of applications Documentation=https://github.com/yousefvand/secret-service [Install] WantedBy=default.target [Service] Type=simple RestartSec=30 Restart=always Environment="MASTERPASSWORD=01234567890123456789012345678912" WorkingDirectory=/usr/bin/ ExecStart=/usr/bin/secretserviced then a user can enable and start the service by: systemctl enable --now --user secretserviced.service This method worked until few months ago but it no longer works. What is wrong with my configurations? PS: I use Archlinux |
Kill noVNC proxy Posted: 11 Feb 2022 02:21 AM PST I want to close my noVNC port after use and I can't seem to do so without a reboot on my Ubuntu machine. I am able to stop the vncserver but the vnc.html on proxy is still accessible. In shorter words, is there anyway to stop the proxy? |
How do I "get write permission for device files" in Linux? Posted: 11 Feb 2022 02:12 AM PST I have just install brightnessctl to control my screen brightness, but can only run it as root. Doing otherwise prints the suggestion I "get write permission for device files". What is the correct way to do this? I would also like to be able to set volume with amixer without root privileges, which I assume is the same issue. |
What is the benefits of this command line (/usr/bin/awk '{$1=$1};1') instead of pure cat Posted: 11 Feb 2022 03:21 AM PST I just checked the AWS eic_harvest_hostkeys script. It's great - and not harvest my secret key :) -. I don't understand this line: key=$(/usr/bin/awk '{$1=$1};1' < "${file}") What is the benefit for awk? key=$(/bin/cat "${file}") isn't better? |
Strange error message when I boot my Debian Buster AMD64 - sep5_30 Posted: 11 Feb 2022 01:44 AM PST I can ssh via another pc but I can't get the login page of the Debian, the boot seems to be stopped. I suspect "Intel vtune " from oneAPI Intel driver to put the mess but I don't know how to find a workaround. sep5_30 : Driver loading ... In directory /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp , I have compile with ./build-driver /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp| sudo ./build-driver sudo ./build-driver C compiler to use: [ /bin/gcc ] C compiler version: 8.3.0 Make command to use: [ /bin/make ] Make version: 4.2.1 Kernel source directory: [ /lib/modules/4.19.0-18-amd64/build ] Kernel version: 4.19.0-18-amd64 Cleaning workspaces ... Done Building socperf driver ... Done Building sep driver ... /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/.tmp_sys64.o: warning: objtool: .text+0x11: unreachable instruction Done Building pax driver ... Done Building vtsspp driver ... make[1]: Entering directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp' make[2]: Entering directory '/usr/src/linux-headers-4.19.0-18-amd64' TEST VTSS_AUTOCONF_ACCESS_OK_TWO_ARGS=no TEST VTSS_AUTOCONF_CPULIST_SCNPRINTF=no TEST VTSS_AUTOCONF_CURRENT_KUID_KGID=yes TEST VTSS_AUTOCONF_DUMP_TRACE_HAVE_BP=no TEST VTSS_AUTOCONF_FLUSH_TLB_INFO=yes TEST VTSS_AUTOCONF_FOR_EACH_KERNEL_TRACEPOINT=yes TEST VTSS_AUTOCONF_HLIST_NODE_ITER=no TEST VTSS_AUTOCONF_INLINE_COPY_FROM_USER=no TEST VTSS_AUTOCONF_JPROBE=no TEST VTSS_AUTOCONF_KAISER=no TEST VTSS_AUTOCONF_KERNEL_HEADERS=yes TEST VTSS_AUTOCONF_KERNEL_READ_WRITE=yes TEST VTSS_AUTOCONF_KMAP_ATOMIC_ONE_ARG=yes TEST VTSS_AUTOCONF_KRETPROBE_INSTANCE_TASK_ARG=yes TEST VTSS_AUTOCONF_KTIME_EQUAL=no TEST VTSS_AUTOCONF_KTIME_GET_TS64=yes TEST VTSS_AUTOCONF_MMAP_LOCK=no TEST VTSS_AUTOCONF_MODULE_CORE_LAYOUT=yes TEST VTSS_AUTOCONF_MODULE_MUTEX=yes TEST VTSS_AUTOCONF_NMI_UACCESS=yes TEST VTSS_AUTOCONF_PREEMPT_NOTIFIER_CONTROL=yes TEST VTSS_AUTOCONF_PROCFS_OPS=no TEST VTSS_AUTOCONF_PROCFS_OWNER=no TEST VTSS_AUTOCONF_PROCFS_SET_USER=yes TEST VTSS_AUTOCONF_PROCFS_SUBTREE=yes TEST VTSS_AUTOCONF_SET_FS=yes TEST VTSS_AUTOCONF_SI_MEM_AVAILABLE=yes TEST VTSS_AUTOCONF_STACKTRACE_OPS=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_ADDRESS_INT=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WALK_STACK=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WALK_STACK_TASK_ARG=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WARNING=no TEST VTSS_AUTOCONF_SYSTEM_UNBOUND_WQ=yes TEST VTSS_AUTOCONF_TASK_STRUCT_HIDDEN_STATE=no TEST VTSS_AUTOCONF_TIMER_SETUP=yes TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_NO_ARG=no TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_PREEMPT_ARG=yes TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_RQ_ARG=no TEST VTSS_AUTOCONF_TRACEPOINT_PROBE=yes TEST VTSS_AUTOCONF_USER_MODE_VM=no TEST VTSS_AUTOCONF_VSYSCALL_ADDR=yes TEST VTSS_AUTOCONF_X86_UNIREGS=yes CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/cmd.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/dsa.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/ipt.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/kpti.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/ksyms.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/lbr.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/mmap.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/modcfg.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/module.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/mpool.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/nmiwd.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pcb.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pebs.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pmi.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pmu.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/probe.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/procfs.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/record.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/sched.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/stack.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/target.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/task.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/task_map.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/transport.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/unwind.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/user_vm.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.o Building modules, stage 2. MODPOST 1 modules CC /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.mod.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.ko make[2]: Leaving directory '/usr/src/linux-headers-4.19.0-18-amd64' cp -f vtsspp.ko vtsspp-x32_64-4.19.0-18-amd64smp.ko make[1]: Leaving directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp' Done Building socwatch driver ... Building drivers for Linux target -n switch is deprecated. Now it does not have any effect. /lib/modules/4.19.0-18-amd64/build will be used as the kernel build directory Removing previously built driver and scripts from /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/drivers mkdir: cannot create directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/drivers': File exists -c /bin/gcc -l -k /lib/modules/4.19.0-18-amd64/build will be used to build the SoCWatch driver -c /bin/gcc -l -k /lib/modules/4.19.0-18-amd64/build ************ Building socwatch2_15.ko driver ************ Using C compiler = /bin/gcc Using kernel build dir = /lib/modules/4.19.0-18-amd64/build No module symvers file found Using common inc dir = /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/../common/include Using file name sw_driver Make args = KERNEL_SRC_DIR=/lib/modules/4.19.0-18-amd64/build CPUFREQ_FIX_BACKPORTED=0 DO_DEBUG_BUILD=0 DO_PROFILING=0 COMMON_INC_DIR=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/../common/include MODULE_SYMVERS_FILE= FILE_NAME=sw_driver make[1]: Entering directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver' make -C /lib/modules/4.19.0-18-amd64/build M=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver clean make[2]: Entering directory '/usr/src/linux-headers-4.19.0-18-amd64' CLEAN /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/.tmp_versions CLEAN /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/Module.symvers make[2]: Leaving directory '/usr/src/linux-headers-4.19.0-18-amd64' make[1]: Leaving directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver' Using C compiler = /bin/gcc Using kernel build dir = /lib/modules/4.19.0-18-amd64/build No module symvers file found Using common inc dir = /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/../common/include Using file name sw_driver Make args = KERNEL_SRC_DIR=/lib/modules/4.19.0-18-amd64/build CPUFREQ_FIX_BACKPORTED=0 DO_DEBUG_BUILD=0 DO_PROFILING=0 COMMON_INC_DIR=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/../common/include MODULE_SYMVERS_FILE= FILE_NAME=sw_driver make[1]: Entering directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver' make -C /lib/modules/4.19.0-18-amd64/build M=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver clean make[2]: Entering directory '/usr/src/linux-headers-4.19.0-18-amd64' make[2]: Leaving directory '/usr/src/linux-headers-4.19.0-18-amd64' ************************************************************ KERNEL_SRC_DIR=/lib/modules/4.19.0-18-amd64/build CPUFREQ_FIX_BACKPORTED=0 DO_SOCPERF=0 MODULE_SYMVERS_FILE= DO_DRIVER_PROFILING=0 INCDIR_1=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/../common/include ************************************************************ make -C /lib/modules/4.19.0-18-amd64/build M=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver modules PWD=/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver make[2]: Entering directory '/usr/src/linux-headers-4.19.0-18-amd64' CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_driver.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_hardware_io.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_output_buffer.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_tracepoint_handlers.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_collector.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_mem.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_internal.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_file_ops.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_ops_provider.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_trace_notifier_provider.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_reader.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_telem.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_pmt.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_counter_list.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/./src/sw_pci.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/socwatch2_15.o Building modules, stage 2. MODPOST 1 modules CC /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/socwatch2_15.mod.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver/socwatch2_15.ko make[2]: Leaving directory '/usr/src/linux-headers-4.19.0-18-amd64' make[1]: Leaving directory '/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/socwatch_driver' ************ Built drivers are copied to /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/socwatch/drivers directory ************ Done mv: target 'socwatch2_15-x32_64-4-x32_64-4.19.0-18-amd64smp.ko' is not a directory make: *** [Makefile:224: default] Error 1 Failed to build the drivers |fab@pablo|22:57|/opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp I) I don't know which directory to set for option --install-dir : I think this should be in /lib/modules but don't know where precisely. II) If I do : $ /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp| sudo make make[1]: Entering directory '/usr/src/linux-headers-4.19.0-18-amd64' TEST VTSS_AUTOCONF_ACCESS_OK_TWO_ARGS=no TEST VTSS_AUTOCONF_CPULIST_SCNPRINTF=no TEST VTSS_AUTOCONF_CURRENT_KUID_KGID=yes TEST VTSS_AUTOCONF_DUMP_TRACE_HAVE_BP=no TEST VTSS_AUTOCONF_FLUSH_TLB_INFO=yes TEST VTSS_AUTOCONF_FOR_EACH_KERNEL_TRACEPOINT=yes TEST VTSS_AUTOCONF_HLIST_NODE_ITER=no TEST VTSS_AUTOCONF_INLINE_COPY_FROM_USER=no TEST VTSS_AUTOCONF_JPROBE=no TEST VTSS_AUTOCONF_KAISER=no TEST VTSS_AUTOCONF_KERNEL_HEADERS=yes TEST VTSS_AUTOCONF_KERNEL_READ_WRITE=yes TEST VTSS_AUTOCONF_KMAP_ATOMIC_ONE_ARG=yes TEST VTSS_AUTOCONF_KRETPROBE_INSTANCE_TASK_ARG=yes TEST VTSS_AUTOCONF_KTIME_EQUAL=no TEST VTSS_AUTOCONF_KTIME_GET_TS64=yes TEST VTSS_AUTOCONF_MMAP_LOCK=no TEST VTSS_AUTOCONF_MODULE_CORE_LAYOUT=yes TEST VTSS_AUTOCONF_MODULE_MUTEX=yes TEST VTSS_AUTOCONF_NMI_UACCESS=yes TEST VTSS_AUTOCONF_PREEMPT_NOTIFIER_CONTROL=yes TEST VTSS_AUTOCONF_PROCFS_OPS=no TEST VTSS_AUTOCONF_PROCFS_OWNER=no TEST VTSS_AUTOCONF_PROCFS_SET_USER=yes TEST VTSS_AUTOCONF_PROCFS_SUBTREE=yes TEST VTSS_AUTOCONF_SET_FS=yes TEST VTSS_AUTOCONF_SI_MEM_AVAILABLE=yes TEST VTSS_AUTOCONF_STACKTRACE_OPS=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_ADDRESS_INT=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WALK_STACK=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WALK_STACK_TASK_ARG=no TEST VTSS_AUTOCONF_STACKTRACE_OPS_WARNING=no TEST VTSS_AUTOCONF_SYSTEM_UNBOUND_WQ=yes TEST VTSS_AUTOCONF_TASK_STRUCT_HIDDEN_STATE=no TEST VTSS_AUTOCONF_TIMER_SETUP=yes TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_NO_ARG=no TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_PREEMPT_ARG=yes TEST VTSS_AUTOCONF_TRACE_SCHED_SWITCH_RQ_ARG=no TEST VTSS_AUTOCONF_TRACEPOINT_PROBE=yes TEST VTSS_AUTOCONF_USER_MODE_VM=no TEST VTSS_AUTOCONF_VSYSCALL_ADDR=yes TEST VTSS_AUTOCONF_X86_UNIREGS=yes CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/cmd.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/dsa.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/ipt.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/kpti.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/ksyms.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/lbr.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/mmap.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/modcfg.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/module.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/mpool.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/nmiwd.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pcb.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pebs.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pmi.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/pmu.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/probe.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/procfs.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/record.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/sched.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/stack.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/target.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/task.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/task_map.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/transport.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/unwind.o CC [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/user_vm.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.o Building modules, stage 2. MODPOST 1 modules CC /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.mod.o LD [M] /opt/intel/oneapi/vtune/2022.0.0/sepdk/src/vtsspp/vtsspp.ko make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-18-amd64' cp -f vtsspp.ko vtsspp-x32_64-4.19.0-18-amd64smp.ko $ sudo make install seems to do nothing III) But once installed, I have with : ./insmod-vtsspp NOTE: super-user or "root" privileges are required in order to continue. Please enter "root" Password: Executing: insmod ./vtsspp-x32_64-4.19.0-18-amd64smp.ko gid=0 mode=0660 ksyms="ffffffff8a513710" insmod: ERROR: could not insert module ./vtsspp-x32_64-4.19.0-18-amd64smp.ko: Invalid parameters Error: vtsspp driver failed to load! You may need to build vtsspp driver for your kernel. Please see the vtsspp driver README for instructions. $ uname -a Linux pablo 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux $ ls -l /lib/modules drwxr-xr-x 1 root 382 Jul 27 2021 4.19.0-17-amd64 drwxr-xr-x 1 root 382 Feb 9 21:51 4.19.0-18-amd64 ps : you can see the message on the attached image above. |
Systemd cgroup Problem - CPUQuota doesn't work for high values, but for low values it does Posted: 11 Feb 2022 01:41 AM PST We have a GitLab Server with a docker-executor runner on the same machine. To keep GitLab responsive we want to limit docker to a certain amount of CPU usage. After some research I found several instructions on how to do this using cgroups set by systemd, most in the way of https://baykara.medium.com/docker-resource-management-via-cgroups-and-systemd-633b093a835c also discussed here in Why are my resource constraints not respected? and here How to limit Docker total resources? So I already looked into these. I tried different configurations and always tested it by running a docker container with the stress program in it: docker run -it --rm jess/stress --cpu 100 which I also tested before that it could put all 16 cores to 100%. After some unsuccessfull trying with the values I wanted (CPUQuota=1500% on a 16-core), I just tested it with [Slice] CPUAccounting=true CPUQuota=20% And it worked perfectly. 20% were kept with around+-2% according to htop and systemd-cgtop . I tried the same with 80%, 150%, 300%, 350% and they all worked. But as soon as I got to 500% or more, the cpu usage started jumping up and down like crazy. For example: Limit is set to 500%. After each display update in htop or systemd-cgtop I get values like 220, 380, 740, 350, 250, 900, 200, 340, 700, 260,... You get the idea. Some values are lower than the limit and some are higher. Over all, more lower than higher numbers. So it still seems to try to limit it (since it's not 1600% all the way), but not to the limit I defined. I could get if I did something wrong in the configuration. But since it worked for all values I tried below 350 I don't get what could be the problem. I also tried adding CPUQuotaPeriodSec with different values without success. AllowedCPUs doesn't work at all. The server is running ubuntu 20.04 with systemd version 245 and docker version 20.10.8 Why is this happening? How can fix it? Thanks for any help. |
Maximum number of clients reachedqt.qpa.xcb: could not connect to display :0 Posted: 11 Feb 2022 01:25 AM PST I am using Linux Mint 20.1 Cinnamon with kernel version 5.4.0-97-generic. I am facing recent issue when try to open okular from terminal or start-menu.. Maximum number of clients reachedqt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb. Aborted (core dumped) There are many issues regarding this, but no particular solution were provided. Any help? |
Using grep and mediainfo together Posted: 11 Feb 2022 01:18 AM PST I'm trying to build a list of movies with the metadata name and the file path. This is my statement so far: find ~/Videos/Movies/ -type f -exec mediainfo {} \; | grep -E 'Movie name|Complete name' | sort > ~/Videos/movies.txt It puts all the data I want in my text file but it arranges it in a single sorted list with the name and path being treated as two separate entries in different places on the queue. How should I change the statement to arrange the list - sorted by movie name but with the path and name together? Thx. |
history of new shell is missing the last few commands? Posted: 11 Feb 2022 01:48 AM PST I've noticed this pretty much ever since I started using Unix systems many years ago, and never bothered to figure out why, abut now I am. When I use terminal, and I want to use history to see a history of commands I've executed, it generates a list, but when I open a new shell while on the existing tab, when I execute history in the new tab, it's missing the last X commands, where X varies. I am wondering why this is, and if it's possible for the new tab to have the same history as the tab it was opened from? |
What are common causes of ext4 file system corruption? Posted: 11 Feb 2022 12:57 AM PST I'm dealing with regular corruption of an ext4 non-root filesystem holding a data cache. The cache is specifically of images cut into pieces for easier processing later. The error in the application logs: OSError: [Errno 74] Bad message: '/redacted/path/to/sliced/image/data' The error in /var/log/syslog : kernel: [163197.788364] EXT4-fs error (device md127): ext4_lookup:1590: inode #125532502: comm python3.6: iget: checksum invalid Notice the filesystem is on a RAID device (md127). This is a RAID5 with three SSDs. Running fsck afterwards always fixes the issue, at least the 4-5 times it has happened so far. However, restarting the running process is obviously a headache and it doesn't seem wise to swallow this exception (OSError ) and mask many other issues. I'm able to trace back to exactly when the file was written (perhaps hours before the exception occurs), but /var/log/syslog reports no issues at that point either. What are common causes of ext4 file system corruption? For example, what programming mistakes typically lead to corruption only at scale and specifically in python (e.g. improper use of locks)? Do errors in the kernel or hardware often lead to corruption without an error in the system logs? |
Arch linux WSL AUR Posted: 11 Feb 2022 02:06 AM PST How can I get AUR builds working in WSL. Essentially I always get Permission denied (os error 13) as I am not running as root But you can't use AUR as root user so catch 22. Example transactions showing as root and local [root@DannysLaptop ~]# paru -S system-monitoring-center :: Resolving dependencies... error: can't install AUR package as root [root@DannysLaptop ~]# su danny [danny@DannysLaptop root]$ paru -S system-monitoring-center :: Resolving dependencies... :: Calculating conflicts... :: Calculating inner conflicts... Repo (8) dmidecode-3.3-1 startup-notification-0.12-7 libxres-1.2.1-1 libwnck3-40.0-1 mesa-utils-8.4.0-7 python-cairo-1.20.1-3 freeglut-3.2.2-1 python-opengl-3.1.5-6 Aur (1) system-monitoring-center-1.2.1-1 :: Proceed to review? [Y/n]: :: Downloading PKGBUILDs... PKGBUILDs up to date nothing new to review error: failed to run: sudo pacman --sync -- extra/dmidecode extra/startup-notification extra/libxres extra/libwnck3 extra/mesa-utils extra/python-cairo extra/freeglut extra/python-opengl: Permission denied (os error 13) [danny@DannysLaptop root]$ |
Can't boot from sd card in Gumstix Overo Posted: 11 Feb 2022 02:36 AM PST So basically, i have a Gumstix Overo that is booting from his NAND flash memory, but i want him to boot from his SD card and the problem that is appearing is that it says that it can't read "boot.scr" and can't read "uImage", what should i do? I hope i could make myself understandable, i'm just beginning to handle a gumstix overo. Next, it is the code that appears on the command line: Texas Instruments X-Loader 1.5.0 (Sep 16 2011 - 12:10:02) OMAP36XX/37XX-GP ES2.1 Board revision: 1 Reading boot sector Error: reading boot sector Loading u-boot.bin from nand U-Boot 2010.09.HAI-00001-g0936672-dirty (Apr 09 2014 - 17:02:47) OMAP36XX/37XX-GP ES2.1, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz Gumstix Overo board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: ECC_8BIT 512 MiB err_loc=2654 err_loc=3315 *** Warning - bad CRC or NAND, using default environment In: serial Out: serial Err: serial Board revision: 1 Direct connection on mmc2 Die ID #160600029bd80000015a7c841601202e Net: smc911x-0 Hit any key to stop autoboot: 0 mmc1 is available reading boot.scr ** Unable to read "boot.scr" from mmc 0:1 ** reading uImage ** Unable to read "uImage" from mmc 0:1 ** Booting from nand ... NAND read: device 0 offset 0x280000, size 0x400000 . . . I never booted from the SD card before, so i don't know if it is working. And i thought that to boot from it, i just had to execute this commands in Gumstix Overo: Overo # nand erase 240000 20000 Overo # reset but unfortunately, it didn't work. Then i tried the following comands: Overo # mmc init mmc1 is available Overo # setenv kerneladdr 0x80200000 Overo # setenv ramdiskaddr 0x81000000 Overo # ext2load mmc1 0:1 ${loadaddr} boot.scr Loading file "boot.scr" from mmc1 device 0:1 (xxa1) ** File not found boot.scr Didn't find the file. |
Change /etc/hosts Posted: 11 Feb 2022 02:55 AM PST I want this file from api.example.com/test/info.php to be taken from localhost/test/info.php . The idea is that I don't want all files from api.example.com to be taken from localhost, just the info.php file. So I've tried to do that by editing /etc/hosts but it does not work: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 127.0.0.1 api.example.com/test/info.php ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 And I know that it does not respect the structure inside /etc/hosts but I'm not sure how to address that. So what can I do? |
Laptop on home network inconsistently loads web pages slowly on all browsers, despite good download speeds Posted: 11 Feb 2022 02:46 AM PST I recently switched from Windows to Void Linux. I did not have this problem in Windows. Sometimes, seemingly at random, certain websites fail to load on every browser I try. I am using WiFi, my laptop does not have an Ethernet port. Download speeds are around 100 Mbps every time I've tested it. Symptoms: - After a reinstall of Void Linux, browsing internet is smooth and internet speeds are around 100 Mbps download and upload.
- After a few hours, browsing internet is inconsistent, and while download speed stays around 100 Mbps (slightly lower (?), and also inconsistent, between 50-300 Mbps), upload speeds take a big hit: between 0 and 50 Mbps.
- This happens on all browsers I have tried (Firefox and Chromium).
- This did not happen when my laptop had Windows.
- This only happens on my Void Linux laptop, no other device on my home network has this issue.
- This does not happen on my University's eduroam WiFi.
- I am unable to access my router settings from any device on my home network.
- I may be wrong but I don't think it's an issue with the router as only my laptop has this problem. I think my router manufacturer just has some other strange way to get to the router settings.
ping ing and dig ing websites while they are taking forever to load get instant replies; doing a CLI speed test indicates (mostly) normal download speeds (see above), only browser web page loading seems to be affected. - CDN's seem to take a long time to resolv.
Info: - No errors in my log files.
- Network card:
Intel Corporation Wi-Fi 6 AX200 - I am currently using
NetworkManager (with wpa_supplicant backend) which uses openresolv / resolvconf . I've had the same problems with ConnMan w/ wpa_supplicant , iwd w/ openresolv , iwd w/ dhcpcd , and wpa_supplicant w/ dhcpcd . - Firewall is turned off until the problem is resolved.
ip address output: 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 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 18:26:49:43:cd:99 brd ff:ff:ff:ff:ff:ff inet 192.168.20.251/24 brd 192.168.20.255 scope global dynamic noprefixroute wlp1s0 valid_lft 85264sec preferred_lft 85264sec inet6 fe80::3d37:94bc:a28a:60c5/64 scope link noprefixroute valid_lft forever preferred_lft forever ip route output: default via 192.168.20.254 dev wlp1s0 proto dhcp metric 600 192.168.20.0/24 dev wlp1s0 proto kernel scope link src 192.168.20.251 metric 600 dig +trace voidlinux.org output: ; <<>> DiG 9.16.22 <<>> +trace voidlinux.org ;; global options: +cmd . 80815 IN NS k.root-servers.net. . 80815 IN NS l.root-servers.net. . 80815 IN NS e.root-servers.net. . 80815 IN NS b.root-servers.net. . 80815 IN NS i.root-servers.net. . 80815 IN NS j.root-servers.net. . 80815 IN NS m.root-servers.net. . 80815 IN NS a.root-servers.net. . 80815 IN NS h.root-servers.net. . 80815 IN NS f.root-servers.net. . 80815 IN NS d.root-servers.net. . 80815 IN NS g.root-servers.net. . 80815 IN NS c.root-servers.net. . 80815 IN RRSIG NS 8 0 518400 20220224050000 20220211040000 9799 . IKxGK31Rom6sN1hxNWtMib8gcLiWWQDp39R3KQL6gVDKxk/SFa4z9rnG AsjP3bDAoWTI+qIlZts8Ylht2YCzzcjfGQrWpSltoeabaEsXq7tR/+YO znd4fqpsg5NpeODrlNd+nEY1ckLA+qobyi+DYkqEb6JvnFKfUlToujJX QMKUvz6QG7mMmKJe1rycwuARzDV6t7rnyQURLjKUIzJQS7nWDhxXOr6C IpcEE0eSPI5E1PiSgDiTdNeechviFI4jNjlqnzHvB4lHW+7Exf4/HAm5 PuloRgKey/FOgeEPUuOsA41HjG7K3Pgm4CtPvoiTQ4tLzLHYJ+Z9kWDx mKrYXw== ;; Received 525 bytes from 192.168.20.254#53(192.168.20.254) in 30 ms org. 172800 IN NS c0.org.afilias-nst.info. org. 172800 IN NS a0.org.afilias-nst.info. org. 172800 IN NS d0.org.afilias-nst.org. org. 172800 IN NS a2.org.afilias-nst.info. org. 172800 IN NS b0.org.afilias-nst.org. org. 172800 IN NS b2.org.afilias-nst.org. org. 86400 IN DS 26974 8 2 4FEDE294C53F438A158C41D39489CD78A86BEB0D8A0AEAFF14745C0D 16E1DE32 org. 86400 IN RRSIG DS 8 1 86400 20220224050000 20220211040000 9799 . iXPg1mtFh+FNy822mvFQVoHWERemFpLuwY1grFRvfk0/pl8cs4L2QlbO 5vshl5DcN3ntyGwWR+BRxlTZx53tVNqttQo2+8cGBsP+LKkoxxtCrO4r S/Nw5hv++VQ4z8TWgk2v1aQaQQqoyi4diIQNgHCnlb0l7D62zrQjjeVH E+EOSUyXo+XzUvbj9umINSm8Axt0reEn1hMEU52itoOZeON5OCOhE60H cwCEXq8n6/a3y+7UhRnEkWD+2Djd68RAg6g8437euhHk4PhPLhlGRHvn pD5qvG2Ll1zbu2BG+Us8x9tV6ll5nnZUWJVsH1SlZCdom7Zl2is0wChM WG/7Sg== ;; Received 807 bytes from 192.33.4.12#53(c.root-servers.net) in 20 ms voidlinux.org. 86400 IN NS ns3.digitalocean.com. voidlinux.org. 86400 IN NS ns2.digitalocean.com. voidlinux.org. 86400 IN NS ns1.digitalocean.com. 1i870vj5h429vj9pci7ar6e9gki74tr7.org. 86400 IN NSEC3 1 1 10 332539EE7F95C32A 1I87R64GAJU4O91MHKBU7I9EKBS7K8UT NS SOA RRSIG DNSKEY NSEC3PARAM 1i870vj5h429vj9pci7ar6e9gki74tr7.org. 86400 IN RRSIG NSEC3 8 2 86400 20220304101551 20220211091551 7986 org. iOIJpvEwgJb01ximZOOpi4aRxzgT3jiOFbKpPTIUgZiQ8bj8OUP+v3lc 6EuJqolMI7m9ikYhDt97QsAPDq253R/IOIu8lF9LrITnfUa4mI8u2p4e e/kU9pRTfdhLl1CP0EyKlt21pmElKXb1ExpabYqXSbC30YkVXb6nEq+E tvc= qbss8sisssqsttu67s36lnfsjl3mmb9q.org. 86400 IN NSEC3 1 1 10 332539EE7F95C32A QBT9BN0HLHQPEC909LJERL6F65Q0I79F NS DS RRSIG qbss8sisssqsttu67s36lnfsjl3mmb9q.org. 86400 IN RRSIG NSEC3 8 2 86400 20220302152327 20220209142327 7986 org. WflMJuQwDt0zp02YfVW6RqXL3GW908SxCpd62qRrVTwVvLxez6V6onN0 jCeHhlhkxy39Pz0iv3VMHtjwU/EX1iywk8Q8zqtt2smQdCdAF8aGcgmQ PCVYZuPJED7wS5PHzoUgj4UxjA3jD3GM2q23TmjY7kPJ9J8lVs9Vcs6M vqI= ;; Received 613 bytes from 199.19.56.1#53(a0.org.afilias-nst.info) in 109 ms voidlinux.org. 1454 IN A 185.199.109.153 ;; Received 58 bytes from 198.41.222.173#53(ns3.digitalocean.com) in 91 ms ip -s -s link show dev wlp1s0 output: 2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000 link/ether 18:26:49:43:cd:99 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 299235002 235792 0 0 0 0 RX errors: length crc frame fifo overrun 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 72749669 83096 0 0 0 0 TX errors: aborted fifo window heartbeat transns 0 0 0 0 6 resolv.conf contents: # Generated by resolvconf search fibernetcpe nameserver 192.168.20.254 Any resources to help me troubleshoot network problems are very much appreciated! |
Remove directory, except when pointed to by symbolic link Posted: 11 Feb 2022 01:56 AM PST I have the below directory structure. I need to find the directories in which a file called log.xml exists and remove all of them completely, except the directory which is pointed to by a specific symbolic link. For example, /dir1/main/app1/v004/ and /dir1/main/app2/v004/log.xml are pointed to by a symbolic link, so they should not be deleted. Also how possible to remove the directory except pointed to by a symbolic link, without finding log.xml . Could you please help with the correct solution for that? /dir1/main/app1/v001/ /dir1/main/app1/v002/log.xml /dir1/main/app1/v003/log.xml /dir1/main/app1/v004/log.xml /dir1/main/app1/v005/log.xml /dir1/ln1/app -> /dir1/main/app2/v004 /dir1/main/app2/v001/ /dir1/main/app2/v002/log.xml /dir1/main/app2/v003/log.xml /dir1/main/app2/v004/log.xml /dir1/main/app2/v005/log.xml /dir1/ln2/app -> /dir1/main/app2/v004 |
Does a symlink from a wxallowed mounted partition apply wxallowed when the target is a partition without wxallowed? Posted: 11 Feb 2022 03:17 AM PST If I configured the following symlink: /usr/local/symlink@ -> /var/target/ Using default disklabel partitions, is the wxallowed mount option applied to the target? |
Finding the longest section in a file Posted: 11 Feb 2022 01:17 AM PST I have a file that begins with SUBBEGIN and ends with SUBEND but have many lines in between these two. I want to fetch any such section that has maximum number of lines in between SUBBEGIN and SUBEND. It will be helpful for me, if I get a command as well for this filtering. a one liner command along with a script for future use. <SUBBEGIN IMSI=XXXXXXXX; MSISDN=XXXXXXXXXXXX; DEFCALL=TS11; CURRENTNAM=BOTH; CAT=COMMON; TBS=TS11&TS12&TS21&TS22&TS61&BS26&BS2G; ODBIC=BAIC; ODBOC=BAOC; <SUBEND <SUBBEGIN IMSI=XXXXXXXX; MSISDN=XXXXXXXXXXXX; DEFCALL=TS11; CURRENTNAM=BOTH; <SUBEND Desired is like below <SUBBEGIN IMSI=XXXXXXXX; MSISDN=XXXXXXXXXXXX; DEFCALL=TS11; CURRENTNAM=BOTH; CAT=COMMON; TBS=TS11&TS12&TS21&TS22&TS61&BS26&BS2G; ODBIC=BAIC; ODBOC=BAOC; <SUBEND Please suggest !! |
Install apt-get on openSUSE Posted: 11 Feb 2022 02:08 AM PST On my system, openSUSE (15.1) is installed, as is zypper packet manager, which I'm not used to. Specifically, I think it lacks a huge amount of software, that I would like to use. I did already manage to install yum and add some repositories, but there is not much more content. This question about Enterprise Linux seems somewhat related, but didn't help for my OS. As I prefer having a packet manager like apt-get over building everything from source, I wonder if there is a way to install it here. Yast was not so useful either |
Assigning value to readonly variable during declaration Posted: 11 Feb 2022 03:19 AM PST Is the following type of readonly variable definition valid?: #!/bin/sh readonly a=1 readonly b=1 readonly c=$((a+b)) Is this type of declaration in combination with assignment allowed/recommended? |
dummy interface on linux Posted: 11 Feb 2022 01:06 AM PST I need to create a second separate virtual interface on Linux. I choose dummy . And do these steps: $ cat /etc/modules-load.d/dummy.conf # Load dummy.ko at boot dummy $ cat /etc/sysconfig/network-scripts/ifcfg-ethdummy1 NAME=ethdummy1 DEVICE=ethdummy1 MACADDR=00:22:22:ff:ff:ff IPADDR=10.10.10.1 NETMASK=255.255.255.0 ONBOOT=yes TYPE=Ethernet NM_CONTROLLED=no Seems like everything works. But on the net I see that people do these lines also: $ cat /etc/modprobe.d/dummy.conf install dummy /sbin/modprobe --ignore-install dummy; /sbin/ip link set name ethdummy1 dev dummy0 What's the point of this line ? Thanks. |
LVM: Decrease/shrink size of a physical volume by deallocating free space from removed logical volume Posted: 11 Feb 2022 02:02 AM PST I have the following LVM partition: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/data-root 5.3G 4.2G 864M 84% / ... /dev/mapper/data-install 6.8G 5.7G 783M 89% /install # vgs VG #PV #LV #SN Attr VSize VFree data 1 2 0 wz--n- <12.50g 0 # vgdisplay --- Volume group --- VG Name data System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <12.50 GiB PE Size 4.00 MiB Total PE 3199 Alloc PE / Size 3199 / <12.50 GiB Free PE / Size 0 / 0 VG UUID jSACsC-wGwy-ki0w-nSCn-kxMy-bLOV-dVN68E # pvs PV VG Fmt Attr PSize PFree /dev/sda2 data lvm2 a-- <12.50g 0 # pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name data PV Size <12.50 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 3199 Free PE 0 Allocated PE 3199 PV UUID CPggVR-sUXw-4gfw-lb2v-cq0j-M5ey-Ct7td3 # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert install data -wi-ao---- 7.00g root data -wi-ao---- <5.50g # lvdisplay --- Logical volume --- LV Path /dev/data/install LV Name install VG Name data LV UUID ZXQmp5-L17b-eQyS-g3An-msk7-Jqso-MTaTIw LV Write Access read/write LV Creation host, time localhost, 2018-09-28 14:42:43 +0000 LV Status available open 1 LV Size 7.00 GiB Current LE 1792 Segments 1 Allocation inherit Read ahead sectors aut - currently set to 8192 Block device 253:1 --- Logical volume --- LV Path /dev/data/root LV Name root VG Name data LV UUID i3eMbC-rcm1-H2Gm-JJeF-jRxO-nL9h-toHSHQ LV Write Access read/write LV Creation host, time localhost, 2018-09-28 14:42:55 +0000 LV Status available # open 1 LV Size <5.50 GiB Current LE 1407 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 I am removing one of the logical volumes: # umount /install # lvremove /dev/data/install # sed -i 'N;/\/dev\/mapper\/data-install/{s#/dev/mapper/data-install.*\n##}' /etc/fstab After the removal: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/data-root 5.3G 4.2G 867M 84% / ... # vgs VG #PV #LV #SN Attr VSize VFre data 1 1 0 wz--n- <12.50g 7.00g # vgdisplay --- Volume group --- VG Name data System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size <12.50 GiB PE Size 4.00 MiB Total PE 3199 Alloc PE / Size 1407 / <5.50 GiB Free PE / Size 1792 / 7.00 GiB VG UUID jSACsC-wGwy-ki0w-nSCn-kxMy-bLOV-dVN68E # pvs PV VG Fmt Attr PSize PFree /dev/sda2 data lvm2 a-- <12.50g 7.00g # pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name data PV Size <12.50 GiB / not usable 3.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 3199 Free PE 1792 Allocated PE 1407 PV UUID CPggVR-sUXw-4gfw-lb2v-cq0j-M5ey-Ct7td3 # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root data -wi-ao---- <5.50g # lvdisplay --- Logical volume --- LV Path /dev/data/root LV Name root VG Name data LV UUID i3eMbC-rcm1-H2Gm-JJeF-jRxO-nL9h-toHSHQ LV Write Access read/write LV Creation host, time localhost, 2018-09-28 14:42:55 +0000 LV Status available # open 1 LV Size <5.50 GiB Current LE 1407 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 How can I shrink the physical volume, volume group and finally the partition altogether by what amounts to the free space after removing the logical volume? Preferably that should be done specifying relative values (to pvresize ?) or something similar to lvextend -l 100%FREE <lvolume> . Also I would like to accomplish this using the command line alone (no GUI). It is also worth noting that the root/system logical volume is active and in use at all times. |
Postfix does not check "From:" address with sender_login_maps Posted: 11 Feb 2022 03:07 AM PST I am trying to set up a postfix configuration where (virtual) users are allowed to only send with "From:"-addresses they own. So I put reject_authenticated_sender_login_mismatch into smtpd_sender_restrictions . Using query = SELECT goto FROM alias WHERE address='%s' and active=1; in my sender_login_maps.cf I can send mails with any sender address I want, even something like madeup@not_my_domain.com . However, postmap -q "madeup@not_my_domain.com" mysql:/etc/postfix/sql/sender_login_maps.cf returns nothing as expected. Now if I change the query to SELECT goto FROM alias WHERE address='notinthedatabaseforsure' and active=1; I am not able to send any mails at all. So far so good. But the log says postfix/smtps/smtpd[11683]: NOQUEUE: reject: RCPT from...: 553 5.7.1 <user@domain.com>: Sender address rejected: not owned by user user@domain.com; from=<user@domain.com> to=<user2@domain.com> proto=ESMTP helo=<[192.168.2.103]> even if I try to send from madeup@not_my_domain.com . user@domain.com is the login name, user2@domain.com the recipient. In a proper setup i would expect something like postfix/smtps/smtpd[11683]: NOQUEUE: reject: RCPT from ...: 553 5.7.1 <madeup@not_my_domain.com>: Sender address rejected: not owned by user user@domain.com; from=<madeup@not_my_domain.com> to=<user2@domain.com> proto=ESMTP helo=<[192.168.2.103]> So it looks like postfix uses the login name to search for the login name regardless of the sender address, which explains why I can send with any sender address using the query I mentioned first. Update: I checked my sql logs and indeed, the MySQL server never sees madeup@not_my_domain.com . It only gets queries for the login address and the recipient address user2@domain.com . Here are the smtps part from master.cf and my main.cf: smtps inet n - - - - smtpd -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -o tls_preempt_cipherlist=yes -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING -o smtpd_sasl_type=dovecot -o smtpd_sasl_security_options=noanonymous -o smtpd_relay_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_mynetworks,permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING -o cleanup_service_name=submission-header-cleanup mynetworks = 127.0.0.0/8 inet_interfaces = all mydomain = domain.com myhostname = mail.domain.com myorigin = $mydomain mydestination = relayhost = smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_recipient smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname smtpd_sender_restrictions = reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, reject_authenticated_sender_login_mismatch, permit_sasl_authenticated smtpd_helo_required = yes smtpd_helo_restrictions = permit_mynetworks reject_invalid_helo_hostname reject_non_fqdn_helo_hostname reject_unknown_helo_hostname smtpd_data_restrictions = reject_unauth_pipelining smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous, noplaintext smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access postscreen_blacklist_action = drop postscreen_greet_action = drop postscreen_dnsbl_threshold = 2 postscreen_dnsbl_sites = dnsbl.sorbs.net*1, bl.spamcop.net*1, ix.dnsbl.manitu.net*2, zen.spamhaus.org*2 postscreen_dnsbl_action = drop virtual_alias_maps = mysql:/etc/postfix/sql/aliases.cf virtual_mailbox_maps = mysql:/etc/postfix/sql/accounts.cf virtual_mailbox_domains = mysql:/etc/postfix/sql/domains.cf relay_domains = mysql:/etc/postfix/sql/relay_domains.cf smtpd_sender_login_maps = mysql:/etc/postfix/sql/sender_login_maps.cf virtual_uid_maps = static:3000 virtual_gid_maps = static:3000 virtual_mailbox_base = /home/vmail # Disable NIS lookup warning alias_maps=hash:/etc/aliases append_dot_mydomain = no recipient_delimiter = + |
scp without replacing existing files in the destination Posted: 11 Feb 2022 02:20 AM PST How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder) |
No comments:
Post a Comment