Displaying 9 results from an estimated 9 matches for "filestat".
2008 Oct 14
5
using rsync to get filestats
Would it be more efficient to use rsync to get filestats instead of
using the 'find' command? I would like to know how big a directory is
on a filesystem, but this directory has millions of small files. I was
wondering if rsync would be more efficient than find when using "-n"
options.
TIA
2010 Dec 10
2
Issues with stat() call on CentOS5 vs CentOS4
...ch is exported from my NAS and mounted with 32k
read/write sizes.
[dougalb at centos4 tmp]$ cat my_stat.c
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
int main(int argc, char **argv)
{
if(argc != 2)
return 1;
struct stat fileStat;
if(stat(argv[1],&fileStat) < 0)
return 1;
printf("Block size: \t\t%d\n",fileStat.st_blksize);
return 0;
}
[dougalb at centos4 tmp]$
[dougalb at centos4 tmp]$ gcc -o my_stat.exe my_stat.c
[dougalb at centos4 tmp]$
[dougalb at centos4 tmp]$ ./my_stat.exe /mnt/nas/...
2014 Jan 30
0
[PATCH 03/05] utils/mkdiskimage.in: Replaced the partly linux-specific file size determination by a sysseek() experiment
...0100
@@ -19,6 +19,7 @@
use bytes;
use integer;
use Fcntl;
+use Fcntl qw(:seek);
use Errno;
use Cwd;
use IO::Handle; # For flush()
@@ -116,15 +117,8 @@ if ( $c == 0 && $file ne '' ) {
$len = 0;
if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) {
$is_open = 1;
-
- if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) {
- $len = $filestat[7] >> 9;
- } elsif ( $is_linux && S_ISBLK($filestat[2]) ) {
- $blksize = pack("L!", 0);
- if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) {
- $len = unpack("L!", $blksize); # In 5...
2014 Jan 30
2
[PATCH 02/05] utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed
utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed.
--- utils/mkdiskimage_patched_01.in 2014-01-30 20:43:02.000000000 +0100
+++ utils/mkdiskimage.in 2014-01-30 20:45:09.000000000 +0100
@@ -217,8 +217,11 @@ print OUTPUT "\x55\xaa";
$totalsize = $c*$h*$s;
$tracks = $c*$h;
-# If -s is given, try to simply use truncate...
-unless
2014 Jul 10
4
[PATCH 1/5] utils/mkdiskimage.in: Option -s caused freshly created image files to be too small by a factor of 512.
---
utils/mkdiskimage.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/mkdiskimage.in b/utils/mkdiskimage.in
index 533193a..a95a077 100644
--- a/utils/mkdiskimage.in
+++ b/utils/mkdiskimage.in
@@ -218,7 +218,7 @@ $totalsize = $c*$h*$s;
$tracks = $c*$h;
# If -s is given, try to simply use truncate...
-unless ($opt{'s'} && truncate(OUTPUT,
2020 Nov 05
1
[PATCH libnbd] copy: Allowing copying from NBD server to NBD server.
This patch is a straightforward refactoring of libnbd?s nbdcopy
program, and not very interesting.
However I have plans for nbdcopy (see full todo below). I would like
to use this utility for virt-v2v as a replacement for ?qemu-img convert?.
qemu-img has caused us a series of problems:
- change in zeroing behaviour caused a big performance regression
- qemu-img reads extents up-front which
2014 Jan 30
1
[PATCH] Mending proposals for mkdiskimage
...es, not in cylinders
+ $mb = $c;
$c = ($c*1024*2)/($h*$s);
+ $zero_tail = ($mb * 1024 * 2 - $c * $h * $s);
}
$is_open = 0;
@@ -116,15 +120,8 @@ if ( $c == 0 && $file ne '' ) {
$len = 0;
if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) {
$is_open = 1;
-
- if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) {
- $len = $filestat[7] >> 9;
- } elsif ( $is_linux && S_ISBLK($filestat[2]) ) {
- $blksize = pack("L!", 0);
- if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) {
- $len = unpack("L!", $blksize); # In 5...
2008 Nov 12
21
zfs boot - U6 kernel patch breaks sparc boot
...tmp/a, and
# find /tmp/a/boot
/tmp/a/boot
/tmp/a/boot/solaris
/tmp/a/boot/solaris/bin
/tmp/a/boot/solaris/bin/extract_boot_filelist
/tmp/a/boot/solaris/bin/create_ramdisk
/tmp/a/boot/solaris/bin/root_archive
/tmp/a/boot/solaris/filelist.ramdisk
/tmp/a/boot/solaris/filelist.safe
/tmp/a/boot/solaris/filestat.ramdisk
# cat /tmp/a/boot/solaris/filelist.ramdisk
etc/cluster/nodeid
etc/dacf.conf
etc/mach
kernel
platform
It looks different than on x86 (no kernels), so is it possible, that the
patch didn''t install all required files or is it simply broken?
Or did somebody forget to mention, that an...
2006 Mar 30
12
network monitoring systems
Does anyone have any recommendations for network monitoring systems that
work with CentOS 3 or 4?
thanks