Recent Questions - Unix & Linux Stack Exchange |
- How to verify a 2MB huge page on a VM is mapped to a 2MB huge page in system/host physical memory?
- grep command with -rn not working properly
- The ERR wrong number of arguments for 'hset' command
- gpio_name_to_desc in gpiolib.c in Linux kernel should be externalized?
- #!/usr/bin/env hangs with NAME=VALUE
- how to compile and run on different linux (debian) versions
- VNC / Ubuntu 18.04 / xfce4: can't launch executables with a GUI
- Execute alias in whisker search bar
- How to format text file from command line and print (font size and page size) using a2ps
- awk output not in columns when moved to log
- Raspberry pi OS can't load lightdm
- How to disable the default gdm login screen
- Terminal emulator that looks like TTY?
- matchbox-keyboard grabs the upper half of the screen
- How to transliterate characters with a wildcard?
- Suggestions for a lightweight linux distro for purpose of coding? [closed]
- Cannot explain size of screenshot PNG file
- VM: Error Starting Domain: USB Device Not Found
- Using Rsync to move then sync lots of data one way
- How can I start a cpp bin at every reboot?
- Why my Intel 256GB SSD disk is being detected as 32kB?
- How to remove lines that have same id string
- How could I find out what my desktop environment or window manager is from a command line command?
- What is the meaning of 'efibootmgr -v' after EFI file path
- How can I add the marked track to a playlist in cmus?
- connection refused (os error 111) using python selenium & geckodriver
- Video card driver problem in Debian (AMD Radeon R5 M330)
- xargs and line-by-line pipe
- Arch Linux - make: error while loading shared libraries: libunistring
How to verify a 2MB huge page on a VM is mapped to a 2MB huge page in system/host physical memory? Posted: 23 Sep 2021 09:50 AM PDT I want to use 2MB huge pages on a VM guest to create contiguous 2MB huge pages in system/host physical memory. I have a test program which mmap's 128MB with the MAP_HUGETLB and MAP_ANONYMOUS flags. I read /proc/PID/smaps to confirm 2MB pages are mapped. I also confirm that 64 huge pages are in use with /proc/meminfo. In /proc/PID/smaps: In /proc/meminfo: I do the same thing on a guest and see that the guest is using 2MB pages in guest physical memory. I want to confirm that the guest's 2MB pages are mapped to 2MB pages in host/system memory. I have configured the guest to use huge pages in the XML file: I confirm that 4GB guest physical memory is mapped to 2MB huge pages in /proc/PID/smaps: /dev/hugepages/libvirt/qemu/8-jwvm2/qemu_back_mem.pc.ram.rIJieT (deleted) I think that would guarantee that the guest would get a real 2MB page in host/system memory, but I need a way to confirm that mmap() with MAP_HUGETLB on the guest really gets a contiguous 2MB page in system/host memory. How can I verify that a 2MB huge page on the guest is mapped to a 2MB huge page on the host? |
grep command with -rn not working properly Posted: 23 Sep 2021 09:48 AM PDT I am trying to find all the files in a directory structure which contain a specific word, but it is not working correctly. For example: whereas But, it was supposed to give |
The ERR wrong number of arguments for 'hset' command Posted: 23 Sep 2021 09:50 AM PDT I am facing a problem on redis 3.0. When I use the command:
It shows the following error: ERR wrong number of arguments for 'hset' command, I used it on redis 5.0 and it works fine, Can you give me an alternative to use on redis 3.0, I need it to be able to update if the key already exists or add a key from the command line |
gpio_name_to_desc in gpiolib.c in Linux kernel should be externalized? Posted: 23 Sep 2021 09:42 AM PDT We have an embedded project, and for our purposes, it seems handy to name all the gpios in the gpio controller device tree stanza using gpio-line-names feature in device tree, mentioned in Documentation/devicetree/bindings/gpio/gpio.txt. The main flaw in this is that the function gpio_name_to_desc() in source/drivers/gpio/gpiolib.c is not externalized for writing kernel drivers. There seem to be very few examples of gpio-line-names in the kernel. For instance, arch/arm/boot/dts/ste-hrefv60plus.dtsi has a string HDTV_INTN, but is not used in kernel space anywhere else. We have looked at the other feature, [-]gpios (and optionally an index), but would prefer the gpio-line-names feature as it is easier to read, and will probably patch our kernel, as it is trivial to externalize the gpio_name_to_desc() function. Is this a dead or nearly dead feature? |
#!/usr/bin/env hangs with NAME=VALUE Posted: 23 Sep 2021 09:35 AM PDT I'm trying to figure out exactly what the semantics of the shebang are. I can write a script like this: without I can of course run it like The And I can use it as such: However, if I try to use that syntax in a shebang: then Can someone explain this to me? I assumed that when a shebang is encountered, it just copies the command, appends the path to the script to the end of the argument list, and executes it, but this behavior suggests otherwise. |
how to compile and run on different linux (debian) versions Posted: 23 Sep 2021 09:40 AM PDT compiled on debian 10 : root@debian:/home/mongo# ldd /home/mongo/build/opt/mongo/db/mongod linux-vdso.so.1 (0x00007ffe9f1c0000) libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f1d7012d000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f1d70105000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f1d700eb0 the same executable on debian 9 ldd /usr/bin/mongod statically linked and it segfaults mongod[12662]: segfault at 8 ip 00007f25798fa821 sp 00007ffccda20090 error 4 in ld-2.24.so what is this due to ? how to compile and run on different linux debian versions ? |
VNC / Ubuntu 18.04 / xfce4: can't launch executables with a GUI Posted: 23 Sep 2021 09:16 AM PDT I'm using VNC remote desktop to visually access a remote Ubuntu 18.04 machine with a xfce4 GUI. VNC works fine. SSH shell works fine. The 2 programs with a graphic UI I'd like to launch are nedit (a visual editor, compiled) and Unity (a game dev IDE). They both have the +x permissions, which I can see in the shell. In VNC, when I click "Properties", I don't see a "Run this as a program" option on either of them, just write/read. When I double click on an either "executable" in VNC's file manager, I get some odd message "Unable to set the xfce4 Display Settings" as if the "executables" were arguments for "Start with a Display". When installing, I saw the Unity GUI in VNC briefly, so I know running Unity is technically possible. The content of ~/.vnc/xstartup: |
Execute alias in whisker search bar Posted: 23 Sep 2021 09:48 AM PDT I created this alias in bash: alias .one='cd Learn/React/React\ JS/one_app/ && code . && exit' to open a project in VSCODE, but when i try to execute in whisker search bar using "!.one" i receive the error "Failed to execute child process". Any help? *Linux mint 20.4 |
How to format text file from command line and print (font size and page size) using a2ps Posted: 23 Sep 2021 08:57 AM PDT I have a thermal printer (80mm Logic Controls LR2000E), connected via USB, to my Debian 11 machine. I want to use the printer to print a purchase order/quote, which I have in a text file. I need to be able to do this from the command line, as it is part of a script. I installed the ppd file from the manufacturer's website (https://logiccontrols.com/product-drivers/). This ppd only allows to specify one paper size by default. I changed it by hand to 80x300mm. I can format (wordwrap etc) through awk and print the text file using This respects the ppd's described paper size, and prints the list: But I would like to control the output more, use smaller font, add borders, etc., so I tried to use a2ps. In the a2ps.cfg file I added the page size that I need: But I don't know how to print my text through a2ps! I've been banging the keybourd for hours over several days, but don't know where to look for more information. It always prints the lower left-hand corner of the generated page instead of the whole thing: a2ps generates what looks like the right output if I save it using the -o table.ps option, but it doesn't fit the page. If I open the ps file in atril (PDF viewer) I can confirm that the text is in the file, wordwrapped and all, and the page size is partly correct (80x353mm), but I can't print it any way. The a2ps info page has a great deal about prettyprint, but not very much about paper sizes. So:
|
awk output not in columns when moved to log Posted: 23 Sep 2021 08:19 AM PDT I have an no problems there, but when I add this output to a script and sent it to
This isn't really a problem but would be easier to deal with down the road in the column format. what do I need to change in the script log output to format it in columns? Here is the command as it is in the script Then sent to the log here |
Raspberry pi OS can't load lightdm Posted: 23 Sep 2021 07:03 AM PDT Running the Pi using physical monitor works fine. But without HDMI connection, The NoMachine couldn't find any display running. Trying start lightdm using |
How to disable the default gdm login screen Posted: 23 Sep 2021 07:02 AM PDT I'd like my Debian 10 box with vanilla GNOME to prompt for login at a tty/text terminal instead of having the gdm GUI pop up by default. Is there a way to change some config such that it works like this, and then the GNOME interface can be started manually with e.g. |
Terminal emulator that looks like TTY? Posted: 23 Sep 2021 07:43 AM PDT Is there a graphical terminal emulator that looks like the tty screen just before the login? I pretty much like the way the tty looks: the font, the high-contrast colors, and the small padding between text and the screen itself. For example, there is little to no padding between the command bar in Vim on tty. However, on alacritty/st/and other terminal emulators there is large, inconvenient gaps between the command bar and the bottom of the terminal, as well as large padding on top and on both sides. The same thing for other TUI programs, such as neomutt and newsboat. If there were a terminal emulator that looks near exactly like tty that would be awesome. Does anyone know of such program? If not, is it possible to eliminate weird padding of those popular terminal emulators I just mentioned? |
matchbox-keyboard grabs the upper half of the screen Posted: 23 Sep 2021 08:32 AM PDT When I run When I close the on-screen keyboard, the maximized windows get back to their almost-fullscreen size. I also installed How exactly is this feature implemented, and is it configurable? Is it possible to start a different application (e.g. |
How to transliterate characters with a wildcard? Posted: 23 Sep 2021 09:34 AM PDT I have a file called I'd like the characters replaced as follows: I have the fixed characters covered with:
or:
But how could I enforce the last 2 rules I mentioned? |
Suggestions for a lightweight linux distro for purpose of coding? [closed] Posted: 23 Sep 2021 07:10 AM PDT I need a lightweight distro for my Acer aspire e3-112m Intel(R) Celeron(R) CPU N2840 @2.16GHz.
|
Cannot explain size of screenshot PNG file Posted: 23 Sep 2021 07:06 AM PDT I am running ubuntu 64-bit on a virtual machine and took a screenshot of a part of my desktop using the shortcut Shift+Print. The To get a better understanding, I asked myself how to arrive at 30,1 kB? Adopting a sloppy calculation, I have to admit that I am a newbie in this topic and there is an easy explanation for my question. Any input is appreciated! |
VM: Error Starting Domain: USB Device Not Found Posted: 23 Sep 2021 07:09 AM PDT I have a working VM that will not load unexpectedly. Using virt-manager in CentOS7 Error is I see USB device I do not know what USB device this would be on the server since this is virtualization. Here are the details of the error:
|
Using Rsync to move then sync lots of data one way Posted: 23 Sep 2021 09:37 AM PDT EDIT: Based on the two indepth answers I gave it a whirl: So --progress to see the results -v to make it verbose? -az to archive it (thus getting time stamps) and z to compress it to save network traffic. -e to login via ssh, of which the machine 10.x.x.xxx does have the sources ssh key in authorized key. Alas I got this error: Which is strange since remote machine has a /data/archive/images/dcam with data in it already. I must not understand fully how rsync works. I have two servers...one has a crap ton of data I want to move to another. So...I NFS mounted the folder onto Server A from Server B (where the backup of sorts lives). Then because this is an important live server, I was nervous to just let RSYNC run on 2TB of data... I ran by hand like this: (inside the /archive/images folder) rsync -r imageDateXX/ /mnt/backup/archive/images/imageDateXX and repeated this for 2TB of folders and data. I finally got it working. So then I was happy I didn't bring the server to the knees and then this data updates throughout the night. So to keep server B with the latest data I set up a cronjob: This kicks off (I assume) but takes like 2 days to complete still. It looks like itis not just seeing what was new/or changed on server A and putting just that to server B but putting all the files back to server B again overwriting. I am not sure how to test this theory but it takes so long. Am I missing a switch in rsync or does my running rsync folder by folder make me then running rsync on the parent folder look 'different' to rsync where as it thinks its all new data and copies everything even if its to the same exact spot on Server b? Not sure how to test this theory or be sure. Thought it was straight forward and rsync automagically just writes over the file or copies the file if it doesn't exists on serverB or has changed on Server A. |
How can I start a cpp bin at every reboot? Posted: 23 Sep 2021 08:19 AM PDT I am beginner in LINUX operating system and my question is the next one: I have a compiled bin from a C++ source code that uses OpenCV and another libs and it displays on the screen the images provided from a USB camera. My code works fine, the next step is to execute this bin file every time when my board have been powered on. I made some research and I found out the reliable method that can help me is to create my own service that can be enabled using systemctl. I tried it but without success but I'm not sure if my service file has been configured properly. Also, I tried with Startup Applications, again it failed. PS: my board: Nvidia Jetson Tx2, my OS: Ubuntu 18.04 LTS. I am waiting for any advice and appreciate your effort to respond. Thank you! Edit: My service file configuration: The Output My shell daemonVDM.sh works fine I executed the next commands: |
Why my Intel 256GB SSD disk is being detected as 32kB? Posted: 23 Sep 2021 09:19 AM PDT I have 256GB Intel SSD 2500 Pro series disk. It worked great on Linux Ubuntu. Now it stopped to work. Now it is detected as follows: Is it a disk or firmware failure ? Should I try to update the disk firmware ? Update 1: I tried to update firmware by using Intel Firmware Update Tool but the tool does not recognize the disk (in this state) as an Intel SSD. |
How to remove lines that have same id string Posted: 23 Sep 2021 08:57 AM PDT I have the following file (note that the I want to remove any two lines that have the same id and have respectively Based on the above example, the output will be: How to do this with |
How could I find out what my desktop environment or window manager is from a command line command? Posted: 23 Sep 2021 09:08 AM PDT Is there a command line command to see which DE or WM you are currently using? |
What is the meaning of 'efibootmgr -v' after EFI file path Posted: 23 Sep 2021 07:58 AM PDT When I run And when I want to see more detailed output, I get this: Based on my reasoning and quick search in man pages (https://linux.die.net/man/8/efibootmgr), the format of the output is: Now what I'm curious is about the meaning of
What I'm asking is: what does this string mean? It seems like UUID if I remove all dot (.) characters between (which will make it into I'm also curious about what is the second boot option mean:
Additional information: Version: My setup: Windows+linux dual boot, on linux I installed these boot managers: grub and systemd-boot |
How can I add the marked track to a playlist in cmus? Posted: 23 Sep 2021 07:56 AM PDT I'd like to quickly add the currently marked track (in view 1, 2 or 4) to my playlist of favorites with a key-bindable command in The man page doesn't reveal a winning strategy. How to do it?
|
connection refused (os error 111) using python selenium & geckodriver Posted: 23 Sep 2021 08:57 AM PDT i am quit new to webscraping, i am building a personal app with python on debian buster and firefox geckodriver as follow, the server is online i aim to triggered this app by a ajax call in a web page, it's a nginx server so the py script is called in a php exec command : it works fine in command line in debian if i am logged in root or another user. when i call the script using web interface, the user is www-data and i encounter this error : connection refused (os error 111) i ve been searching for 3 days in all internet sources i can find and tried all i could, i haven't any solution for now would you have any idea of the way to solve this issue? Edit :
|
Video card driver problem in Debian (AMD Radeon R5 M330) Posted: 23 Sep 2021 07:05 AM PDT I am new to Linux. I am using Debian 8. I tried to play some games, but it seems that they are using my integrated Intel video card instead of discrete AMD Radeon: Star Conflict doesn't even show the space - everything is completely black (I can only see ship's interface components). Games with much less requirements can produce the image but they are running very slow even on low graphics settings. On the same laptop on Windows side I can play Bioshock Infinite on high settings very well. So, it seems to be linux driver's fault. I have some program called "ATI Catalyst Control Center Linux edition" in my gnome menu and when I try to run it, I get this message: I tried installing AMD proprietary driver, but it fails to install. So, I'd like to use open-source driver, it doesn't really matter, I just want to get my graphics card working. Output of I am also curios why it says "Display controller" instead of "VGA compatible controller" like it says about Intel's integrated card. So, the final question is: What software/driver should I install or how should I configure my system to get my discrete card working? I am sorry if I gave not enough info - I just don't know what information is needed here. I would like to provide any info you ask. |
Posted: 23 Sep 2021 08:27 AM PDT I have 3 files: Basicaly, the point is to create the Could someone point out why using the |
Arch Linux - make: error while loading shared libraries: libunistring Posted: 23 Sep 2021 08:08 AM PDT I keep getting this same error when trying to install various packages: It's occurred while trying to install the Ruby gem Gosu as well as some free Linux games like Alien Arena. I even tried re-installing libunistring with pacman to no avail. |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment