diskspace

How can I estimate the disk size of a string with JavaScript?

我是研究僧i 提交于 2019-12-06 23:45:18
问题 I need to try to estimate the DISK size of a text string (which could be raw text or a Base64 encoded string for an image/audio/etc) in JavaScript. I'm not sure how to estimate this. The only thing when Googling i can find is .length so i thought maybe someone on StackOverflow might know... The reason i need to know is i have a localStorage script that needs (or would love to have) the ability to check when a user is nearing his 5MB (or 10MB in IE) quota and prompt them to increase the max

SQL Server 2005: disk space taken by dropped columns

a 夏天 提交于 2019-12-06 01:13:55
I have a big table in SQL Server 2005 that's taking about 3.5 GB of space (according to sp_spaceused). It has 10 million records, and several indexes. I just dropped a bunch of columns from it, such that the record length got reduced to a half, and to my surprise it took zero time to do that. Obviously, sp_spaceused was still reporting the same taken space, SQL server hadn't really done anything when dropping the columns, other than marking them as "dropped". So I moved all the data from this table into another new table, truncated it, and moved all the data back, so that it'd get all

Mysql: Disk is full error

倖福魔咒の 提交于 2019-12-05 17:22:35
I have some problem with my mysql server. 120310 6:55:36 [ERROR] /usr/libexec/mysqld: Disk is full writing './virtual/cdrs.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs 120310 6:59:14 [ERROR] /usr/libexec/mysqld: Disk is full writing '/var/lib/mysql/virtual/recordedcalls.MYI' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs 120310 7:05:36 [ERROR] /usr/libexec/mysqld: Disk is full writing './virtual/cdrs.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs 120310 7:09:14 [ERROR] /usr/libexec/mysqld: Disk is full writing '/var

Laravel 5.1: ErrorException in file_put_contents() error,possibly out of free disk space

╄→尐↘猪︶ㄣ 提交于 2019-12-05 17:10:34
This error arrived all out of a sudden. ErrorException in D:\xampp\htdocs\pckg\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php line 81: file_put_contents(): Only 0 of 3520 bytes written, possibly out of free disk space I just freed / cleared the laravel.log file in the storage/logs folder. Also clearing cache & sessions folders in storage/framework folder can help. It just cleared the error and the login page was loaded again ! The main issue is laravel.log file. For me the file size has grown upto 24G, clearing the file made everything fine. Use command sudo truncate -s 0

How can I reduce the size of a Subversion repository?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 12:04:20
问题 I have a pair of svn repositories which are significantly larger than others. They're not too big for svn, but they're taking a lot of disk space I'd rather be using for something else. What strategies are available for reducing the disk use of svn repositories? I tried the "removing dead transactions" section described here but that didn't get me anywhere. What else should I try? ETA: Is this question better asked on Server Fault? 回答1: If the used disk space is more important for you than

How can I find the free space available on mounted volumes using Perl?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 06:25:35
I'm trying to untar a file. Before untarring I would like to know free space available on the mounted volume. The plan is if there is not enough space I will not untar it! So how can I find the free space available on a mounted volume using Perl? By the way, I'm using Perl for tar and untar. Everybody is saying about df and dh but these commands doesn't work on the mount points. What if I want to find the free space that I can write into on a mounted point? Using shell commands to generate a single K-free number which Perl can use: Change into the directory where you want to untar (if not

How can I estimate the disk size of a string with JavaScript?

耗尽温柔 提交于 2019-12-05 02:59:04
I need to try to estimate the DISK size of a text string (which could be raw text or a Base64 encoded string for an image/audio/etc) in JavaScript. I'm not sure how to estimate this. The only thing when Googling i can find is .length so i thought maybe someone on StackOverflow might know... The reason i need to know is i have a localStorage script that needs (or would love to have) the ability to check when a user is nearing his 5MB (or 10MB in IE) quota and prompt them to increase the max size for the domain. So, if a user hits, lets say, 4.5MBs of data it'd prompt with You're nearing your

Generate disk usage graphs/charts with CLI only tools in Linux

孤者浪人 提交于 2019-12-05 02:13:12
In this question someone asked for ways to display disk usage in Linux. I'd like to take this one step further down the cli-path... how about a shell script that takes the output from something like a reasonable answer to the previous question and generates a graph/chart from it (output in a png file or something)? This may be a bit too much code to ask for in a regular question, but my guess is that someone already has a oneliner laying around somewhere... I would recommend munin . It is designed for exactly this sort of thing - graphing CPU usage, memory usage, disc-usage and such. sort of

How to get the current free disk space in Postgres?

感情迁移 提交于 2019-12-05 01:20:47
I need to be sure that I have at least 1Gb of free disk space before start doing some work in my database. I'm looking for something like this: select pg_get_free_disk_space(); Is it possible? (I found nothing about it in docs). PG: 9.3 & OS: Linux/Windows Craig Ringer PostgreSQL does not currently have features to directly expose disk space. For one thing, which disk? A production PostgreSQL instance often looks like this: /pg/pg94/ : a RAID6 of fast reliable storage on a BBU RAID controller in WB mode, for the catalogs and most important data /pg/pg94/pg_xlog : a fast reliable RAID1, for the

How to get the current free disk space in Bash?

时光毁灭记忆、已成空白 提交于 2019-12-04 13:30:06
I'm running some operations which constantly eat up my disk space. For this reason I want my computer to make a sound when disk space is running below 2GB. I know I can get an output listing the free diskspace by running df -h : Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 112Gi 100Gi 12Gi 90% 26291472 3038975 90% / devfs 191Ki 191Ki 0Bi 100% 663 0 100% /dev map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home but I can't use this output in an if-then statement so that I can play a sound when the Available free space drops