ncdu | NCurses Disk Usage
kandi X-RAY | ncdu Summary
kandi X-RAY | ncdu Summary
NCurses Disk Usage (clone of http://dev.yorhel.nl/ncdu)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ncdu
ncdu Key Features
ncdu Examples and Code Snippets
Community Discussions
Trending Discussions on ncdu
QUESTION
I managed to truncate my bash history file to 500 entries by running a shell that didn't have any of my configuration (it was vanilla).
I realized this about 300 commands too late, but luckily I had a session open from before the truncate. history
in that session gives me my "deleted" history, but it's in this format:
ANSWER
Answered 2021-Nov-04 at 18:39history -a
will overwrite your bash history file with the history returned by the history
command for the current session.
You need to copy your current bash history, and can then append it to the original file.
It does not, however, bring back the first 500 entries.
Thanks to @markp-fuso for this solution.
QUESTION
I have run into a problem today where I am unable to connect via SSH to my Google Cloud VM instance running debian-10-buster. SSH has been working until today when it suddenly lost connection while docker was running. I've tried rebooting the VM instance and resetting, but the problem still persists. This is the serial console output on GCE, but I am not sure what to look for in that, so any help would be highly appreciated.
Another weird thing is that earlier today before the problem started, my disk usage was fine and then suddenly I was getting a bunch of errors that the disk was out of space even after I tried clearing up a bunch of space. df
showed that the disk was 100% full to the point where I couldn't even install ncdu
to see what was taking the space. So then I tried rebooting the instance to see if that would help and that's when the SSH problem started. Now I am unable to connect to SSH at all (even through the online GCE interface), so I am not sure what next steps to take.
ANSWER
Answered 2021-Sep-17 at 00:03Your system has run out of disk space for the boot (root) file system.
The error message is:
Root filesystem has insufficient free space
Shutdown the VM, resize the disk larger in the Google Cloud Web GUI and then restart the VM.
Provided that there are no uncorrectable file system errors, your system will startup, resize the partition and file system, and be fine.
If you have modified the boot disk (partition restructuring, added additional partitions, etc) then you will need to repair and resize manually.
I wrote an article on resizing the Debian root file system. My article goes into more detail than you need, but I do explain the low level details of what happens.
QUESTION
Having a hard time figuring this one out. I have a docker container that just keeps growing in size.
Running sudo du -h / | grep '[0-9\.]\+G'
shows that the container e917b9b06 is taking up almost 60G of space.
If I do docker ps
is looks like that container is my nginx container.
I thought perhaps it was logs, but all the nginx logs are symlinks to stdout. There's nothing in the tmp directory.
Any fancy tools to figure out what is happening here? ncdu inside the container doesn't show anything of value.
...ANSWER
Answered 2021-Aug-26 at 21:12I suspect it is indeed the logs.
While you are correct that nginx logs are streamed to stdout, that would means docker store the logs directly as container logs. You have several options (pick any, but only one):
Just delete/recreate the containers. It will create a fresh one. You'll be safe as long as you already put the persistent data in the correct volume.
Go to the
/var/lib/docker/containers/
. You will find the stdout logs there, usually in the format:-json.log
depending on your docker version. Just check where the big file is. Confirm the content withtail
. If this is the logs, delete or truncate it:truncate -s 0
or simply: >
if you want to use redirection.
Now that we fixed the issue, we should try to prevent it from happening again.
I can see that you already running these containers for 3 years. Congratulations. Container-based approach would mean that it should be trivial if you just delete or create the new container, by the orchestrator.
If you plan on running this for a long time, I suggest you read about docker log rotation. The default one, the json log driver, doesn't have rotation by default so you should specify the limit either in your docker run command or docker compose. This is the relevant documentation about json log driver. Or you can use other log driver like syslog.
QUESTION
Ansible version: 2.8.3 or Any
I'm using -m
Ansible's ad-hoc command to ensure the following package is installed --OR-- let's say if I have a task to install few yum packages, like (i.e. How can I do the same within a task (possibly when I'm not using ansible's shell / command modules):
ANSWER
Answered 2021-Feb-15 at 21:06If you're looking for any solution, just grepping what you need and using printf
will do what you want - the string is "beautified", it's just marking the new lines with \n
:
QUESTION
I have a node in my K8S cluster that I use for monitoring tools.
Pods running here: Grafana
, PGAdmin
, Prometheus
, and kube-state-metrics
My problem is that I have a lot of evicted pods
The pods evicted: kube-state-metrics
, grafana-core
, pgadmin
Then, the pod evicted with reason: The node was low on resource: [DiskPressure].
: kube-state-metrics
(90% of evicted pods), pgadmin
(20% of evicted pods)
When I check any of the pods, I have free space on disk:
...ANSWER
Answered 2020-Mar-19 at 16:13Apparently you're about to run out of the available disk space on your node. However keep in mind that according to the documentation DiskPressure
condition denotes:
Available disk space and inodes on either the node’s root filesystem or image filesystem has satisfied an eviction threshold
Try to run df -h
but on your worker node
, not in a Pod
. What is the percentage of disk usage ? Additionally you may check kubelet logs for more details:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ncdu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page