Recent Questions - Unix & Linux Stack Exchange |
- `ulimit` a shell, not a user
- How to use an inferior when input rewriting in GUIX?
- During zpool scrub, does estimated completion time have a bug shows 0.01% at 10%?
- Multiple ExecStartPre in systemd unit override files. Does systemd guarantee execution order?
- sudoers - when command is run as a specific user
- Is it secure to copy packages directly to /var/cache/apt/archives/?
- How to display process title by ps?
- How does the regular expression [\\\/][^\\\/]*$ work?
- Samba AD DC DNS Directory Service error
- Why is curl, but not wget, having trust issues with software.download.prss.microsoft.com?
- In GUIX, how to use a old version of a package, no longer in the channel?
- Use Ansible 2.12 to access AWS EC2 via host: tag class
- Who killed my sort? or How to efficient count distinct values from a csv column
- Cpu frequency is too low due to faulty battery
- Chromium not opening in WSL2
- Is it possible to use lazy dynamic linking on Linux?
- Apache2 returning "APACHE_RUN_DIR" error on docker container
- "systemctl set-property user-1009.slice CPUQuota=50%" - Failed to set unit properties on user-1009.slice: Unit user-1009.slice is not loaded
- How do you open the control center from Linux Mint Cinammon Desktop terminal?
- How to list the open file descriptors (and the files they refer to) in my current bash session
- Mounting SD card on Linux Mint => "mount: special device does not exist"
- Sync two Directories without rsync
- RSH giving Connectin Refused error on RHEL
- How to combine zsh autocomplete for wrapper function arguments and existing command
- Graphical Btrfs tool
- GPU usage monitoring (CUDA)
- Jump to specific character in a line in VI
Posted: 15 Apr 2022 02:07 AM PDT We're multiple user to work on a same account I want to limit my activities to not hang the computer, to not bother the other users. I want to limit my resources' usage to not use it all (because if a process can, it uses it all) There are 2 approaches, the priority one and strict limit one. Problem is, Linux don't manage very well priorities, meaning you'll slow down other activities even with the worse priority. So it let the strict limit But I want to limit only my shell, not the account that many person uses Do you have suggestions regarding priorities or strict limit? |
How to use an inferior when input rewriting in GUIX? Posted: 15 Apr 2022 01:42 AM PDT The GUIX Inferiors manual states that
However, I cannot figure out how to use an Inferior when rewriting the input of a package. E.g. this manifest does not work for me:
How can I do this rewriting of input with an inferior? Apparently there now is a (As for the XY-problem, I can now run |
During zpool scrub, does estimated completion time have a bug shows 0.01% at 10%? Posted: 15 Apr 2022 01:15 AM PDT I have a raidz2 on a quad of 250G drives in a USB enclosure on linux. Purely for backups. In fact I'm aware at least one drive has issues so it's a fun experiment. Naturally, it has started to hiccup - the drive parks and re-powers the spindle then it's back. Always I can repair/clear the write errors, but while scrub is running on the 673 GB volume, I see 0.01% just now 10% the way through I believe now this is a bug as it is out by exactly factor x100. I guess I could file this in the tracker. |
Multiple ExecStartPre in systemd unit override files. Does systemd guarantee execution order? Posted: 14 Apr 2022 11:09 PM PDT From various sources, it seems like having ExecStartPre in an override conf file is executed in order and after the main service file. But is this guaranteed by systemd itself? Also what happens if the ExecStartPre is a nohup of some sort? Or a long running process? |
sudoers - when command is run as a specific user Posted: 14 Apr 2022 11:53 PM PDT I wish to keep certain environment variables when a certain command is run as a certain user under I've tried variations of this (adding spaces, changing the command etc) but to no avail. The paragraph I mentioned:
Any help or insight would be much appreciated. |
Is it secure to copy packages directly to /var/cache/apt/archives/? Posted: 14 Apr 2022 11:09 PM PDT After a fresh install, instead of downloading some .deb packages from a Debian mirror, I would like to copy the files directly from thumb drive to /var/cache/apt/archives/ Would it offer the same security guarantees (in case the files are corrupted) ? In other words, are the files hashes checked even when taken from cache, or only just after a finished download ? Should I use a specific chmod / chown for the cached .deb ? Apt 2.2.4 / Debian 11 |
How to display process title by ps? Posted: 14 Apr 2022 09:23 PM PDT As per setproctitle(3), the process title appears on the ps command. But after looking up the ps(1), I still have no idea how to display it by ps. |
How does the regular expression [\\\/][^\\\/]*$ work? Posted: 14 Apr 2022 11:01 PM PDT I've some notes of useful regular expressions and one that I always use is the following: The result that I get from this regular expression is the path of the parent folder However, I haven't managed to figure out what is the meaning of |
Samba AD DC DNS Directory Service error Posted: 15 Apr 2022 02:13 AM PDT Clients can log in, pull the cached gpos, only the stored credentials for mapped drives are lacking. With the RSAT tools, of course, no more connection. Im really confused at this point because this is the result of a problem with the resolv.conf file. i fixed the resolv.conf but the directory services seem to have said goodbye. So:
resolv.conf ip addr Netzwerk config resolvectl smb.conf The Logs are pretty confusing to me The only one containing current logs is m% Does anyone see what im missing out on ???? Are there important Infos missing ?? |
Why is curl, but not wget, having trust issues with software.download.prss.microsoft.com? Posted: 14 Apr 2022 10:34 PM PDT The following URL redirects to a microsoft.com subdomain: https://tb.rg-adguard.net/dl.php?go=3dd1ce66 Namely to I was able to get the final redirect URL by running: But no matter if I run I always get certificate errors that I don't get when downloading the file using Firefox. Why is the behavior not consistent across different applications (Firefox vs wget). Is there actually reason not to trust that certificate (and if so why is Firefox not catching that) or is wget at fault? I'm using Fedora 35 x64 with Wget 1.21.2 and Firefox 98.0. |
In GUIX, how to use a old version of a package, no longer in the channel? Posted: 15 Apr 2022 01:01 AM PDT Part of what attracted me to GUIX is that various different versions of packages can be 'installed' at the same time without interfering with each other. But I can't figure out how to actually use those different versions. E.g. recently, the How can I use these older versions? It would be fine to use such an older version only in isolation. For example, I was hoping something like this could work: This error is expected, because that older version is not available in my channels. So maybe it is possible to somehow specify an older version of the channel to be used, but I cannot figure out how. Side-node about the XY-problem, the immediate cause for this question is that docker-compose now does not work anymore: However, I do not care particularly about docker-compose (w.r.t. this question). If anything, this question is part of my journey to replace that with GUIX-native tools. (Also, I'm aware that pyyaml 6 forces some safety features on its users, so pyyaml 5 should not be used anymore; pyyaml is just used as an example.) |
Use Ansible 2.12 to access AWS EC2 via host: tag class Posted: 14 Apr 2022 08:17 PM PDT On my local hardware, I have a Vagrant box running Ubuntu 20, on which I'm using Ansible 2.12.2 I am able to access AWS and even create an EC2 instance within a VPN. When I view inventory, I can see the EC2 server as: In my next playbook, I can access the server via But I would prefer to access it by any of the tags in the json above. I have tried and but I get errors like How do I reach EC2 hosts using class tags? (or any other tag..) My playbook is as follows: |
Who killed my sort? or How to efficient count distinct values from a csv column Posted: 14 Apr 2022 10:53 PM PDT I'm doing some processing trying to get how many different lines in a file containing 160,353,104 lines. Here is my pipeline and stderr output. My command-line PS1 or PS2 printed the return codes of all process of the pipeline. The question is, why did it returned KILL, does it means something sent a UpdatesAfter reading Marcus Müller Answer, first I've tried to load the data into Sqlite.
This was taking a lot of time, so I leave it processing and went to do other things. While it I thought more about this other paragraph from Marcus Müller Answer:
So I thought, I can implement that. When I got back into computer, my Sqlite import process had stopped cause of a SSH Broken Pip, think as it didn't transmit data for a long time it closed the connection. Ok, what a good opportunity to implement a counter using a dict/map/hashtable. So I've write the follow So I've used it by the follow command pipeline. It was going really really fast, projection of This time mostly sure cause by out-of-memory-killer as spotted in Marcus Müller Answer TLDR section. So I've just checked and I don't have swap enabled in this machine. Disabled it after complete its setup with dmcrypt and LVM as you may get more information in this answers of mine. So what I'm thinking is to enable my LVM swap partition and trying to run it again. Also at some moment I think that I've seen tqdm using 10GiB of RAM. But I'm pretty sure I've seen wrongly or In Stéphane Chazelas comment to this question they say:
I would like to know more about it, should I find something in journalctl? If so, how to do it? Anyways, as Marcus Müller Answer says, loading the csv into Sqlite may be by far the most smart solution, as it will allow to operate on data in may ways and probably has some smart way to import this data without out-of-memory. But now I'm twice curious about how to find out why as process was killed, as I want to know about my Update2So I've enabled my SWAP partition and took Marcus Müller suggestion from this question comment. Using pythons collections.Counter. So my new code ( So I've run Gnu Screen to even if I get a broken pipe again I could just resume the session, than run it in the follow pipeline: That got me the follow output: As you can see it took way more time to sort the data than to count it. One other thing you may notice is that tqdm second line output shows just 1.00it, it means it got just a single line. So I've checked the user5 file using head: As you can see, it printed the entire list of tuples in a single line. For solving this I've used the good old sed as follow Good enough to work latter. Now I think I should add an update after trying to check who killed my sort using dmesg ou journalctl. I'm also wondering if there is a way to make this script faster. Maybe creating a threadpool, but have to check pythons dict behavior, also thought about other data-structures as the column I'm counting is fixed width string, maybe using a list to storage the frequency of each different user_hash. Also I read the python implementation of Counter, it's just a dict, pretty much same implementation I had before, but instead of using Update3So I'm getting so deep in the rabbit hole, totally lost focus of my objective. I started search for faster sorting, maybe write some C or Rust, but realized that already have the data I came for processed. So I'm here to show dmesg output and one final tip about the python script. The tip is: may be better to just count using dict or Counter, than sort its output using gnu sort tool. Probably sort sorts faster than python sorted buitin function. About dmesg, it was pretty simple to find out of memory, just did a That's it, thank you so much for helping so far, hope it help others too. |
Cpu frequency is too low due to faulty battery Posted: 15 Apr 2022 01:04 AM PDT I have a battery which apparently is dead (I've tried to re-calibrate it with As a result CPU frequency is set to the lowest value I've tried to set the frequency manually but it fails Rising it with sysfs didn't work also, How can I disable CPU frequency scaling completely or set it to the maximum? The problem occurs only on Linux, OpenBSD works on maximum CPU frequency I'm also able to measure performance degradation with where it gives me about ~50MB/s, almost 10 times less than expected. |
Posted: 14 Apr 2022 08:16 PM PDT I am a Linux noob using the ubuntu 20.04 distro. I use Linux via WSL2 and my OS is Windows 10. I managed to install chromium but the app simply fails to open without a warning, when I try to open it using GUI. I tried using the terminal to open it and then this came up:[0103/222716.865545:ERROR:exception_handler_server.cc(361)] getsockopt: Invalid argument . I referred to this video to install Chromium: https://youtu.be/FJ-ymbDIths. But I couldn't do one step in it (Around 3:30 minutes as I couldn't find the "Softwares and Updates" window). I don't know whether that caused the issue. How to fix this? I haven't found any possible duplicates for this yet. EDIT: As mentioned in the comments, I checked the version and found it to be version 1! I don't know why it happened though! Ubuntu-20.04 | Running | 1 |
Is it possible to use lazy dynamic linking on Linux? Posted: 15 Apr 2022 02:00 AM PDT On UNIX, I may use a commandline like: with the result that the libraries listed to the right of In this case, This trick may be used to keep the incore representation of the executable smaller if it does not use all features. Is there a way to achive the same on Linux? The GNU linker seems to have a flag The background for this question is that on Solaris, it is simple to link the current Bourne Shell (bosh) using lazy linking and this results in a shell that is nearly as small as |
Apache2 returning "APACHE_RUN_DIR" error on docker container Posted: 14 Apr 2022 10:02 PM PDT When trying to start my roundcube mailserver on a docker container I get the apache error: Even if I declared all the envvars in the dockerfile like: I'm starting it with an init.sh file as seen below I also checked if the evvars and direcories exist in the docker container. The RUN_DIR is set and also /var/run/apache2 exists. Within is the apache2.pid set with an id. When opening the localhost address the pure php code is shown.. |
Posted: 15 Apr 2022 01:04 AM PDT I'm trying to set per-user limits on processes, most of them are run with sudo --user. Why do user-1001 and user-1008 on my system have the slice files, but I can't get it on 1009? I tried manually creating the file Also this doesn't make sense to me, the testprocess (PID 26668) shows in ps -U 1009, but it's running under the slice for user-1008 (because user-1008 used sudo to run it?) Searching around, all I could find is people saying to login as the user to fix this, but obviously the user has processes open. And I tried using su - user1009 in another terminal, but that didn't seem to help |
How do you open the control center from Linux Mint Cinammon Desktop terminal? Posted: 15 Apr 2022 02:17 AM PDT How do you open the control center from Linux Mint Cinammon Desktop terminal? Also, is it just shooter's preference for which file management is best? I don't have a problem with Nemo so far but if there's better out there, any suggestions? Thanks for any help! |
How to list the open file descriptors (and the files they refer to) in my current bash session Posted: 15 Apr 2022 02:28 AM PDT I am running in an interactive bash session. I have created some file descriptors, using exec, and I would like to list what is the current status of my bash session. Is there a way to list the currently open file descriptors? |
Mounting SD card on Linux Mint => "mount: special device does not exist" Posted: 14 Apr 2022 11:03 PM PDT Trying to mount an SD card connected via a USB SD-card reader. dmesg shows that the USB device is connected and the card is detected fdisk shows that it is connected, although it complains about some invalid argument: When trying to mount, I get the "special device does not exist" message: Any idea? |
Sync two Directories without rsync Posted: 15 Apr 2022 12:03 AM PDT I know what you are thinking right now "Just use rsync" but unfortunately this system does not have rsync, and I would like to come up with another solution. The Setup:
Let's call it Migrating with only Post-It Notes... Now to complicate matters, Server 1 keeps getting new files every day, due to new Uploads or Thumbnails being generated, so that idea in your head right now "just copy the file from 1 to 2" will not work, as once I am done with the Copy of about 20+GB I can start again, as there is already new file on the source Server... My Solution Idea
My Problem
Now before I start writing a bash script loop , I was wondering if there is someone out there that could suggest another way of doing this without a bash script... good old low level CLI. |
RSH giving Connectin Refused error on RHEL Posted: 15 Apr 2022 02:06 AM PDT I am trying to do |
How to combine zsh autocomplete for wrapper function arguments and existing command Posted: 14 Apr 2022 09:03 PM PDT I work mostly in gvim and many terminals. Originally, I preferred to open all my files in a single vim instance. To that end I used an alias to open files from my terminals in the current 'vim server'. But having many files from multiple projects open in a single vim instance impacts my productivity, so I'm upgrading my alias to a function. Now this new
However, since I'm using a function for TLDR; So, how do I create a completion script that combines the Here's my Current Behavior Currently
Expected Behavior
|
Posted: 14 Apr 2022 08:38 PM PDT Is there a graphical tool for creating Btrfs sub-partitions and in particular, subpartitions like "GParted" or "system-config-lvm"? I'm running Debian squeeze. In response to the first comment, Btrfs can do thinks like RAID and sub-partitions, much like LVM. I've read that Btrfs can be seen as a replacement for LVM. LVM has a graphical tool to manage these aspects, does Btrfs have the same? |
Posted: 15 Apr 2022 01:39 AM PDT I installed CUDA toolkit on my computer and started BOINC project on GPU. In BOINC I can see that it is running on GPU, but is there a tool that can show me more details about that what is running on GPU - GPU usage and memory usage? |
Jump to specific character in a line in VI Posted: 14 Apr 2022 11:47 PM PDT In VI, I know that if you do and hit enter, you will jump to the line specified by "some_number". Is there an equivalent for jumping to a specific character in a single line? Basically, I have a large csv and there is some characters that are breaking the parser; so I have to debug it. I'm getting an error message that basically says "unexpected character on line XXX character YYY". I know how to get to XXX but how do I get to YYY? |
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