Free space of HDD ?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Free space of HDD ?
# 8  
Old 06-16-2009
Well....considering this is a Red Hat Linux forum, as a sub of the Linux Forum, Assuming that bdf exists would be.....you tell me? I know of bdf on HPUX however answering here as to "bdf works for me" seems to be counter productive, no?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

2. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

3. AIX

Moving free space from one LV to another LV

in the same VG? Is there a way we can do this? We basically have a test server that used to be a production server. Now the newly created test directories have run out of space and the old production directories have alot of free space. Can we transfer that free space over? If so how? Have... (2 Replies)
Discussion started by: NycUnxer
2 Replies

4. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

5. UNIX for Dummies Questions & Answers

free space, used space in ftp

Is possible to see how much available space there is on a ftp server and how much is used through ftp ? how ? free space: used space: thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

6. Solaris

how to get the more memory free space (see memory free column)

Hi all, Could please let me know how to get the more memory free space (not added the RAM) in local zone. -bash-3.00# vmstat 2 5 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 s1 s1 in sy cs us sy... (3 Replies)
Discussion started by: murthy76
3 Replies

7. HP-UX

HP-UX using unused HDD space

Hello, I have a system with HP-UX 11.23 installed on it. There are ~36GB of unused space on the HDD. I did a very basic installation, and it created the usual volume group /dev/vg00. When I look at the output of ioscan -funC disk, I see this (and more, but irrelevant to this post): disk ... (1 Reply)
Discussion started by: goon12
1 Replies

8. Shell Programming and Scripting

HDD free space check

Hi, I need to add a condition in a script. The script is executed only if there is free 8 Gigas space. I know if then fi I don't know how to write the condition on free space Thanks :) (1 Reply)
Discussion started by: pppswing
1 Replies

9. Solaris

free space, associated by filesystem name...

is there a command that will display amount of free space...associated by filesystem name? # df /home /home (/dev/dsk/c1t0d0s3 ): 8069326 blocks 487280 files HP has bdf: bdf /home Filesystem kbytes used ... (2 Replies)
Discussion started by: mr_manny
2 Replies

10. Solaris

Maximizing 20GB HDD space

hello All! I have sun ultra5 pc with 9GB HDD and I'm planning to add 20GB HHD for future expansion and it is coming from my old intel based pc. My problem is everytime I formatted the new HD the system only gives me the result of free space for about 2GB+ as a maximum space. I have... (1 Reply)
Discussion started by: xtian
1 Replies
Login or Register to Ask a Question
MALLINFO(3)						     Linux Programmer's Manual						       MALLINFO(3)

NAME
mallinfo - obtain memory allocation information SYNOPSIS
#include <malloc.h> struct mallinfo mallinfo(void); DESCRIPTION
The mallinfo() function returns a copy of a structure containing information about memory allocations performed by malloc(3) and related functions. This structure is defined as follows: struct mallinfo { int arena; /* Non-mmapped space allocated (bytes) */ int ordblks; /* Number of free chunks */ int smblks; /* Number of free fastbin blocks */ int hblks; /* Number of mmapped regions */ int hblkhd; /* Space allocated in mmapped regions (bytes) */ int usmblks; /* Maximum total allocated space (bytes) */ int fsmblks; /* Space in freed fastbin blocks (bytes) */ int uordblks; /* Total allocated space (bytes) */ int fordblks; /* Total free space (bytes) */ int keepcost; /* Top-most, releasable space (bytes) */ }; The fields of the mallinfo structure contain the following information: arena The total amount of memory allocated by means other than mmap(2) (i.e., memory allocated on the heap). This figure includes both in-use blocks and blocks on the free list. ordblks The number of ordinary (i.e., non-fastbin) free blocks. smblks The number of fastbin free blocks (see mallopt(3)). hblks The number of blocks currently allocated using mmap(2). (See the discussion of M_MMAP_THRESHOLD in mallopt(3).) hblkhd The number of bytes in blocks currently allocated using mmap(2). usmblks The "highwater mark" for allocated space--that is, the maximum amount of space that was ever allocated. This field is maintained only in nonthreading environments. fsmblks The total number of bytes in fastbin free blocks. uordblks The total number of bytes used by in-use allocations. fordblks The total number of bytes in free blocks. keepcost The total amount of releasable free space at the top of the heap. This is the maximum number of bytes that could ideally (i.e., ignoring page alignment restrictions, and so on) be released by malloc_trim(3). CONFORMING TO
This function is not specified by POSIX or the C standards. A similar function exists on many System V derivatives, and was specified in the SVID. BUGS
Information is returned for only the main memory allocation area. Allocations in other arenas are excluded. See malloc_stats(3) and mal- loc_info(3) for alternatives that include information about other arenas. The fields of the mallinfo structure are typed as int. However, because some internal bookkeeping values may be of type long, the reported values may wrap around zero and thus be inaccurate. EXAMPLE
The program below employs mallinfo() to retrieve memory allocation statistics before and after allocating and freeing some blocks of mem- ory. The statistics are displayed on standard output. The first two command-line arguments specify the number and size of blocks to be allocated with malloc(3). The remaining three arguments specify which of the allocated blocks should be freed with free(3). These three arguments are optional, and specify (in order): the step size to be used in the loop that frees blocks (the default is 1, meaning free all blocks in the range); the ordinal position of the first block to be freed (default 0, meaning the first allocated block); and a number one greater than the ordinal position of the last block to be freed (default is one greater than the maximum block number). If these three arguments are omitted, then the defaults cause all allocated blocks to be freed. In the following example run of the program, 1000 allocations of 100 bytes are performed, and then every second allocated block is freed: $ ./a.out 1000 100 2 ============== Before allocating blocks ============== Total non-mmapped bytes (arena): 0 # of free chunks (ordblks): 1 # of free fastbin blocks (smblks): 0 # of mapped regions (hblks): 0 Bytes in mapped regions (hblkhd): 0 Max. total allocated space (usmblks): 0 Free bytes held in fastbins (fsmblks): 0 Total allocated space (uordblks): 0 Total free space (fordblks): 0 Topmost releasable block (keepcost): 0 ============== After allocating blocks ============== Total non-mmapped bytes (arena): 135168 # of free chunks (ordblks): 1 # of free fastbin blocks (smblks): 0 # of mapped regions (hblks): 0 Bytes in mapped regions (hblkhd): 0 Max. total allocated space (usmblks): 0 Free bytes held in fastbins (fsmblks): 0 Total allocated space (uordblks): 104000 Total free space (fordblks): 31168 Topmost releasable block (keepcost): 31168 ============== After freeing blocks ============== Total non-mmapped bytes (arena): 135168 # of free chunks (ordblks): 501 # of free fastbin blocks (smblks): 0 # of mapped regions (hblks): 0 Bytes in mapped regions (hblkhd): 0 Max. total allocated space (usmblks): 0 Free bytes held in fastbins (fsmblks): 0 Total allocated space (uordblks): 52000 Total free space (fordblks): 83168 Topmost releasable block (keepcost): 31168 Program source #include <malloc.h> #include "tlpi_hdr.h" static void display_mallinfo(void) { struct mallinfo mi; mi = mallinfo(); printf("Total non-mmapped bytes (arena): %d ", mi.arena); printf("# of free chunks (ordblks): %d ", mi.ordblks); printf("# of free fastbin blocks (smblks): %d ", mi.smblks); printf("# of mapped regions (hblks): %d ", mi.hblks); printf("Bytes in mapped regions (hblkhd): %d ", mi.hblkhd); printf("Max. total allocated space (usmblks): %d ", mi.usmblks); printf("Free bytes held in fastbins (fsmblks): %d ", mi.fsmblks); printf("Total allocated space (uordblks): %d ", mi.uordblks); printf("Total free space (fordblks): %d ", mi.fordblks); printf("Topmost releasable block (keepcost): %d ", mi.keepcost); } int main(int argc, char *argv[]) { #define MAX_ALLOCS 2000000 char *alloc[MAX_ALLOCS]; int numBlocks, j, freeBegin, freeEnd, freeStep; size_t blockSize; if (argc < 3 || strcmp(argv[1], "--help") == 0) usageErr("%s num-blocks block-size [free-step [start-free " "[end-free]]] ", argv[0]); numBlocks = atoi(argv[1]); blockSize = atoi(argv[2]); freeStep = (argc > 3) ? atoi(argv[3]) : 1; freeBegin = (argc > 4) ? atoi(argv[4]) : 0; freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks; printf("============== Before allocating blocks ============== "); display_mallinfo(); for (j = 0; j < numBlocks; j++) { if (numBlocks >= MAX_ALLOCS) fatal("Too many allocations"); alloc[j] = malloc(blockSize); if (alloc[j] == NULL) errExit("malloc"); } printf(" ============== After allocating blocks ============== "); display_mallinfo(); for (j = freeBegin; j < freeEnd; j += freeStep) free(alloc[j]); printf(" ============== After freeing blocks ============== "); display_mallinfo(); exit(EXIT_SUCCESS); } SEE ALSO
mmap(2), malloc(3), malloc_info(3), malloc_stats(3), malloc_trim(3), mallopt(3) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-05-06 MALLINFO(3)