diskspace

Docker container logs taking all my disk space

会有一股神秘感。 提交于 2019-12-20 08:48:06
问题 I am running a container on a VM. My container is writing logs by default to /var/lib/docker/containers/CONTAINER_ID/CONTAINER_ID-json.log file until the disk is full. Currently, I have to delete manually this file to avoid the disk to be full. I read that in Docker 1.8 there will be a parameter to rotate the logs. What would you recommend as the current workaround? 回答1: Docker 1.8 has been released with a log rotation option. Adding: --log-opt max-size=50m when the container is launched does

Disk usage of files whose names match a regex, in Linux?

我是研究僧i 提交于 2019-12-18 10:48:11
问题 So, in many situations I wanted a way to know how much of my disk space is used by what, so I know what to get rid of, convert to another format, store elsewhere (such as data DVDs), move to another partition, etc. In this case I'm looking at a Windows partition from a SliTaz Linux bootable media. In most cases, what I want is the size of files and folders, and for that I use NCurses-based ncdu: But in this case, I want a way to get the size of all files matching a regex . An example regex

Android SDK folder taking a lot of disk space. Do we need to keep all of the System Images?

让人想犯罪 __ 提交于 2019-12-17 21:24:39
问题 There are a lot of system images piling up on my disk in the android sdk folder. i hardly use the emulator. May be once in 6 months. Most of my development is directly on device. What i wanted to check was, will removing the system images (at least for the old APIS i.e. < 22) impact the development? Also, the google apis folder seen below. Should i keep it for all versions or just the one in the latest suffice? Screenshot above is from WinDirStat tool. - https://windirstat.net 回答1: System

Auto compact the deleted space in mongodb?

和自甴很熟 提交于 2019-12-17 04:16:24
问题 The mongodb document says that To compact this space, run db.repairDatabase() from the mongo shell (note this operation will block and is slow). in http://www.mongodb.org/display/DOCS/Excessive+Disk+Space I wonder how to make the mongodb free deleted disk space automatically ? p.s. We stored many downloading task in mongodb, up to 20GB, and finished these in half an hour. 回答1: In general if you don't need to shrink your datafiles you shouldn't shrink them at all. This is because "growing"

Auto compact the deleted space in mongodb?

荒凉一梦 提交于 2019-12-17 04:16:14
问题 The mongodb document says that To compact this space, run db.repairDatabase() from the mongo shell (note this operation will block and is slow). in http://www.mongodb.org/display/DOCS/Excessive+Disk+Space I wonder how to make the mongodb free deleted disk space automatically ? p.s. We stored many downloading task in mongodb, up to 20GB, and finished these in half an hour. 回答1: In general if you don't need to shrink your datafiles you shouldn't shrink them at all. This is because "growing"

Get free space on internal memory

浪子不回头ぞ 提交于 2019-12-17 03:03:06
问题 Is it possible to get the amount of free memory on an Android device (not on the SD CARD) via the Android SDK? If so, how? 回答1: this post might fit well to your question. also check this thread. there is so much info here on SO. googled a bit and here is the solution (found at android git) File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); return Formatter.formatFileSize

How to detect total available/free disk space on the iPhone/iPad device?

丶灬走出姿态 提交于 2019-12-16 19:58:49
问题 I'm looking for a better way to detect available/free disk space on the iPhone/iPad device programmatically. Currently I'm using the NSFileManager to detect the disk space. Following is the snippet of the code which does the job for me: -(unsigned)getFreeDiskspacePrivate { NSDictionary *atDict = [[NSFileManager defaultManager] attributesOfFileSystemForPath:@"/" error:NULL]; unsigned freeSpace = [[atDict objectForKey:NSFileSystemFreeSize] unsignedIntValue]; NSLog(@"%s - Free Diskspace: %u

How to detect total available/free disk space on the iPhone/iPad device?

倾然丶 夕夏残阳落幕 提交于 2019-12-16 19:57:00
问题 I'm looking for a better way to detect available/free disk space on the iPhone/iPad device programmatically. Currently I'm using the NSFileManager to detect the disk space. Following is the snippet of the code which does the job for me: -(unsigned)getFreeDiskspacePrivate { NSDictionary *atDict = [[NSFileManager defaultManager] attributesOfFileSystemForPath:@"/" error:NULL]; unsigned freeSpace = [[atDict objectForKey:NSFileSystemFreeSize] unsignedIntValue]; NSLog(@"%s - Free Diskspace: %u

Size vs Size On Disk

痴心易碎 提交于 2019-12-16 18:03:28
问题 I read about the byte vs cluster theory, but I don't think it can apply in my case; Doesn't seem to have to do with "a bunch of small files"; . ├── [ 11K] 2ndVisit_Checklist.xlsx ├── [ 35K] 2ndVisit FTS_Timetable.xlsx ├── [ 34K] 2ndVisit_Roomlist.pdf ├── [ 27K] 2ndVisit_Teilnehmer.xlsx ├── [9.5K] Belgian Pupils for European Parliament.xlsx ├── [4.0K] Brussel EU │ ├── [ 64K] Checkliste.doc │ ├── [144K] Plan A73.doc │ ├── [ 38K] TN Liste EP.docx │ └── [108K] TN Liste EP V02.doc ├── [ 12K]

With InnoDB, how can I claim back index space?

不羁的心 提交于 2019-12-13 17:10:50
问题 I have some large InnoDB databases, close to 1TB. In order to free up some space while working on an alternative storage, I deleted some unused InnoDB indexes hoping that it would free up some space. It freed nothing. As it's InnoDB, will the engine use the empty allocated space for further inserts and indexing ? Thanks 回答1: InnoDB stores data in a tablespace. By default, there is one single tablespace and data of all the databases is stored in one file. This file has data dictionary, tables,