Get the disk read stat bytes

Hello.

I am trying to retrieve the number of disk read bytes at a time with SIGAR and I'll have a few unusual results. When I run this code:

Sigar sigar = new Sigar();

Info org.hyperic.sigar.DiskUsage = sigar.getDiskUsage("D:\\"); "

long read = infos.getReadBytes ();

I receive a very large number who is not representative of the use of the disc. Can anyone suggest what I am doing wrong? I would be very happy!

return numbers in the region of:
628467
629786
629514

Hello

ReadBytes is a counter, so you'll need to compare the difference over time.  For example:
Sigar sigar = new Sigar();

long prevTime = 0;
long prevBytes = 0;
final long interval = 1 * 1000;

While (true) {}
a long time = System.currentTimeMillis ();
long = sigar.getDiskUsage("D:").getReadBytes();) bytes
If (prevTime! = 0) {}
long = rate (bytes - prevBytes) / ((time-prevTime) / interval);
System.out.println ("bytes per second of disc =" + Sigar.formatSize (rate));
}
prevTime = time;
prevBytes = bytes;
Thread.Sleep (Interval);
}

Tags: VMware

Similar Questions

  • Portege R830: don't seem to be able to get the fingerprint reader to work

    HI - need help.

    I have a Toshiba R830 I got "downgrade" to Windows 7 32 bit version pre-installed 64-bit. Long story - but it's the software compatibility.

    Despite the download and the installation of what I think is all the relvant 32 drivers - I don't seem to be able to get the fingerprint reader to work.

    I downloaded and installed the software fp-sw-201103311304 Tosh - chilled out and tried to install it.

    It's actually hard to know if it is installed! I get a window telling me it will extract the file in a directory C:\temp and tells me at the same time that 'tinstallwb.exe' will start once the extraction is complete.

    It seems to extract - but I do not see that the installation is happening.

    Subsequently it is has that nothing listed in the title of the programs - and nothing "launches."

    In Device Manager - I can't see anything that is listed as "fingerprint reader" under security features - the list is TPM 1.2. Not actually sure that is nothing to do with the fingerprint reader - well I've enabled and then disabled via the BIOS.

    Am I missing something?
    Could the reader [which I have not used since the new - even if it's only 8 weeks] have stopped working?

    Would be very grateful for pointers.

    Try to start the installation manually. On the desktop create a folder unpack and after doing the beginning downloaded exe. Extract the files to the folder unpack and disable command run after extraction.

    When files are checked almost open and Toshiba archive extracted file extractor. You will find setup.exe.
    Try please to start it manually.

  • Compaq nc6400 upgraded xp to win 7 can not get the fingerprint reader to work

    I have upgraded xp to win 7, as we will have to do, but can't get the fingerprint reader to work. It appears in the devices that there is one on the machine. I downloaded the drivers for Vista, but they got nowhere.  Read in many places as Vista drivers will work but I seem to need more than that. Any clue?  Thank you!!!

    Hello:

    Yes, for Vista fingerprint reader driver is the only one available, but you must install the software HP protect Manager security tools for Windows 7 from the model which succeeded the nc6400, who was the 6910p.

    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3357378&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_77198_1%257CswEnvOID%253D4053%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

    You must also use the W7 driver quick launch buttons.

    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3357378&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_78740_1%257CswEnvOID%253D4053%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

    If your computer laptop bluetooth, you need the W7 bluetooth software and driver...

    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3357378&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_76382_1%257CswEnvOID%253D4053%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

    And you can use the version of W7 HP wireless assistant software.

    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3357378&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_76368_1%257CswEnvOID%253D4053%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

    You can also read the manual tools security protect manager, so you can understand how to use the fingerprint reader.

    http://h20566.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?spf_p.tpst=kbDocDisplay_ws_BI&spf_p.rid_kbDocDisplay=docDisplayResURL&javax.portlet.begCacheTok=com.vignette.cachetoken&spf_p.rst_kbDocDisplay=wsrp-resourceState%3DdocId%253Demr_na-c00881344-7%257CdocLocale%253Den_US&javax.portlet.endCacheTok=com.vignette.cachetoken

  • I was getting a new hard drive to my HP laptop. Since I have a key for Windows Vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    I was getting a new hard drive to my HP laptop. Since I have a key for Windows Vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    original title: reinstall Windows Vista

    I was getting a new hard drive to my HP laptop.  Since I have a key for windows vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    Contact HP (if they had not initially you provided with support or the media manufacturing process or you have lost the media and/or you don't want EU to some tools to clone the old drive to the new or can not do...) for a copy of the media restore/recovery of your system.

    http://www.ZDNet.com/blog/Bott/lost-your-Windows-discs-how-to-get-replacement-media-legally/4320?PG=3

  • Script to get the disk and LUN informaiton

    Hi all

    I have the list of virtual machines on servers different vCente and I need to get the disk and LUN information for the list of virtual machines.

    Help me build the script?

    Kind regards

    Vijay

    $Information = @)

    $Vminfo = get - VM | Select-Object *, @{N = "Hard drives"; E={$_ | Get-HardDisk}}, @{N = "HDDcount"; E={($_ | (Get-harddisk).length}}

    $vmlist = $Vminfo | Sort-Object-down HDDcount

    {foreach ($vm to $vmlist)

    #$Harddiskinfo = $vm | Get-hard drive

    $props = new-Object PSObject

    $props | Add-member-name "Folder" - Membertype NoteProperty-value $vm.folder

    $props | Add-member-name "VMName" - Membertype NoteProperty-value $vm. Name

    $props | Add-Member-name "vCPUs" - Membertype NoteProperty-value $vm. NumCpu

    $props | Add-member-name "Memory (GB)" - Membertype NoteProperty-value $vm. MemoryGB

    $DiskNum = 0

    foreach ($hdd in $vm. Hard drives) {}

    $controllerinfo = $hdd. ExtensionData

    $datastoreName = $($hdd.) Filename.Substring (1) - split ("]" ")) [0]

    $datastoreinfo = get-$datastoreName data store

    $controllerkey = $controllerinfo.controllerkey.tostring)

    $keycount = ($controllerkey |)  measure-object-character | Select-Object - expandproperty Characters) m:System.NET.SocketAddress.ToString)

    $virtualID = "{0}: {1}: {2} ' f $controllerkey.substring (0,1), $controllerkey.substring ($keycount - 1), $hdd. ExtensionData.Unitnumber

    $props | Add-Member-name "Disk scsiID$ ($DiskNum) '-Membertype NoteProperty-value $virtualID

    $props | Add-member-name "$($DiskNum) hard disk drive"-Membertype NoteProperty-value $hdd. Name

    $props | Add-member-name "Disk$ ($DiskNum) Size (GB)"-Membertype NoteProperty-value $hdd. CapacityGB

    $props | Add-member-name "$($DiskNum) DatastoreName disc"-Membertype NoteProperty-value $datastoreName

    $props | Add-member-name "$($DiskNum) DatastoreSize disc"-Membertype NoteProperty-value $datastoreinfo. CapacityGB

    $props | Add-member-name "$($DiskNum) DatastoreFreeSpace disc"-Membertype NoteProperty-value $datastoreinfo. FreeSpaceGB

    $DiskNum ++

    }

    $Information += $props

    }

    $Information | Out-GridView

  • Failed to get the disk partition information when you add the new data store

    Hello

    Update my ESX to version 4 Update 1 (4.0.0, 256968). Now, I'm trying to add a new data store to a cluster in vCenter and receive the following error message when I will review the current structure of the disc "error when configuring the host: failed to get the disk partition information. When I click back, then next, there's no error message but in the formatting window, I get the error "Object reference" not set to an instance of an object.

    I see this question has been asked before, but I can't seem to find an appropriate response. Anyone? The interface using CLI instead of vCenter isn't an option (alignment VMFS, workload and so on)

    I use Dell R900 with an EMC Symmetrix VMax SAN

    The size of the LUN I want to add is 741 GB

    Concerning

    Marius Aulie

    If you have a virtual machine for Windows test, you could do the following, to ensure that the logic unit number has a clean partition table:

    -set the LUN as a GROSS physical to virtual machine device

    -Run diskpart, select the drive and run the CLEAN command

    -detach the LUN to the virtual machine

    -try to create the data on the LUN VMFS store

    The size of the block of the data store where the VM test can be a problem with the above. Due to the size of the LUN, the size of the block of the data store must be at least 4 MB. Attach the LUN to a physical test system could be an alternative.

    André

  • How to get the last DML statement in each block

    Hello

    How can I get the latest DML statements in each block.
    As SYSTEM. LAST_QUERY returns the last select statement, I need to get the last Insert/Update/Delete statement
    in each block.

    Thanks in advance

    Rizly

    Rizly,

    You can use the GET_BLOCK_PROPERTY to get the last query executed on this block.

         MESSAGE(GET_BLOCK_PROPERTY('', LAST_QUERY));
    

    Kind regards

    Manu.

    If this answer is useful or appropriate, please mark. Thank you.

  • Does anyone know how to change windows to recognize the disks with 520 bytes per sector? Or one knows if Windows 7 will recognize no 512 bytes per sector drives? Reader vendors will move to larger areas in the future.

    Windows does not recognize disks that are not 512 bytes per sector. Put readers at the point as unknown and I can't access it through the operating system. Is there something I can change to get Windows to recognize the disks that are not 512 bytes per sector?

    Hello MetalRain,

    Thank you for your message.  Are you able to see the disks in disk management?  Try the following:
    Click 'Start' > right click on 'My computer' > select 'manage '.
    Click on "disk management".
    On the right, you see your drive?  If so, you can right click and it assign a drive letter.
    Now you should be able to close this window and you can format your drive to NTFS, you can specify to change the bytes per sector 512 if you wish as seen HERE.
    After assigning a drive letter, follow the steps below:
    Click "Start" > click "Run" > type cmd in the text field and press "Enter."
    In the command prompt, type format c:/FS: NTFS / a: 512 and press "Enter."
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Computer does not load Windows. (Missing\corrupt file and the disk read error)

    I woke up this morning and my computer screen said:

    "Read a disk error has occurred."
    Press Ctrl + Alt + Delete to restart»

    So I did, and he just keeps it again and again. I turned off my PC, disconnected from the power and took out the battery. EXPECTED, put everything back in and turned on the computer. This time he made a lot of strange beeping noises and took forever and then I got this error:

    "Windows was not start because the following file is missing or damaged:
    \SYSTEM32\NTOSKRNL.exe
    Please reinstall a copy of the above file.

    I pressed on enter and it gave me the error reading disc again.

    Yesterday I updated my BIOS. So I also tried to go to my BIOS screen and "Load factory default settings", but I always get errors that I said just above and windows does not load.

    Help =)

    Hello I would wait until you try to do the repair first

    Make sure that the hd is just a notebook size hd
    Make sure that the speed is the same thing that you already size is really for you
    before you start to have a complete set of installation discs for the mfgr
    If you only use the os disk you will not load the microsoft embedded key encode any additional programs the mfgr installed or modified specially for your computer model and the party in the form of hard disk, you will need to do it yourself the format should be identical to the new factory
    uninstall all the equipment installed after you bought the computer (you must add once installation is complete)

  • How can I get the Adobe Reader message that says "an internal error has occurred" on my computer?

    When I'm on a Web page and click on something that I need to register to it appears; also when I was at my college site, I wanted to see a list of my studies of plans he appears so... help

    If the error message is Adobe Reader, the simplest thing to do is to uninstall Adobe Reader using Control Panel > add or remove programs, then download and install the version appropriate for your operating system: http://get.adobe.com/reader/otherversions/

    The Council on this download page "you may need to temporarily disable your antivirus software": during the installation, not as long as you download.

  • How can I get the Disk Defragmenter to work under Vista?

    Disk Cleanup cannot get Disk Defragmenter to work.

    Hello

    I wasn't a big fan of the disk in vista Defragmenter

    Download a little program called auslogic disk defrag and its FREE and works very well!

    http://www.filehippo.com/search?q=Auslogics

    Concerning

    GT4U

  • Windows 7 can not get the fingerprint reader to show

    I have a T500 I removed Vista and installed Windows 7.   But now I can't the fingerprint reader will be displayed at sign in.   I think that I have installed the driver, but it does not appear.   I went into Device Manager and it seems to be responsible.   Any ideas?

    You need not fingerprint software from Lenovo. It's just another program that is running in the background.

    Windows 7 has all the functions that the software Lenovo offers. Whether you use it or not, it's up to you.

    in any case, to get the fingerprint logon to work, you must go into control panel > biometrics. Then you need to check "Allow connections to fingerprints" (or something of the sort). It will ask you to register to use fingers.

    The next time you start your computer/log, you will be asked to use your fingerprint to log. It works exactly as it would if the Lenovo program was there (with the sole exception of the sliding-finger-to-boot-computer functionality).

  • How can I get the Adobe Reader software, but NOT the "DC" Cloud version?

    For years, I appreciated the help of the original Adobe Reader that would allow me to view PDFs via Windows Viewer or my other software, just, as I used to be able to do. Now, it seems that Adobe requires this convoluted "DC" on users version. I don't want to. I don't need all these so-called features. I don't want to "be in the clouds! -I want just a basic version that allows to display a clean image, strong, with zoom tools, etc.

    Where can I get what I need, please? Of course, I hope for a version that has the day in safety.

    I will appreciate it if someone would provide a URL to the "appropriate" download location link, unless Adobe no longer provides what some users want or need.

    Hi Larry cross,

    You can download Adobe Reader XI from the link below:

    http://get.Adobe.com/reader/Enterprise/

    You must select the operating system you use, the language of Adobe Reader you want to and the version of Adobe Reader (Select 11.0.10).

  • Get the network traffic in bytes

    I try to get the number of bytes to pass by the network interface.

    The code I use is:

    String [] interfaceList = this.proxy.getNetInterfaceList ();
    a long time in = 0L;
    long out = 0L;

    for (String inteface: interfaceList) {}
    log. Debug (inteface);
    NetInterfaceStat netsstat = this.proxy.getNetInterfaceStat (inteface);
    in += netsstat.getRxBytes ();
    on += netsstat.getTxBytes ();
    }

    I'm not sure that I do it well, because the figures are not updated often. For example, I download a movie from youTube and the number does not change. I have to wait 30 seconds before it changes. Is the resolution of a minimum amount of time (on Windows 2000 Pro) is 30 seconds?

    Hi James,

    I saw this.proxy in your code, guess that is an instance of SigarProxyCache?  This class is a wrapper for caching the values returned by the underlying class of Sigar, 30 seconds by default.  You can change this value by default, but it seems you'd be better of just using the new Sigar() straight-up instead of the ProxyCache.

  • Pavilion dv7 6051ea: how to get the fingerprint reader works on Windows 10

    Just upgraded to Windows 7 Pro for Windows 10 Pro. The fingerprintreader has stopped working. I find the possibility to set up, but the installation is grayed out as long as no driver available. Can't find one on any forum support? Anyone else having this problem and sorted it please?

    On August 11. I've been running Windows 10 updates on a daily basis since the upgrade and now after a reboot of the fingerprint reader has started working? and remembered my impression as well. I guess that Microsoft dropped in a fix for this (which works for me) then maybe something to try?

Maybe you are looking for

  • Virus has damaged Satellite L755 - 17Q - now cannot load

    Satellite L755 - 17Q I accidentally downloaded a virus, that virus I think and then turned off my computer and now once I try to load it, the Toshiba screen appears, but then the screen goes black with just a small bar flashes in the upper left corne

  • iMac freezes

    I submit a question just now on my iMac gel, and I send more information to help you determine the cause. The comments, I had was that the ram was to blame because at the time I had only 4 GB. I've since upgraded. First I bought 8 GB OWC and then dis

  • Upgrade memory of 2800 satellite

    HelloI have a satellite 2800 series model PS280L FQQL3CSS. When I bought this machine the PIII 700 Mhz, 128 MB of RAM seemed a lot, but now Windows 2000 Prof, the machine really creeps! I tried to find an expansion of 256 MB but the last 2 I got, a t

  • can not turn on wifi on ubuntu 11.04

    recently, I installed ubuntu 11.04 on my l645 laptop and I could not find out how to turn the wireless on this subject. but wireless is working properly, when I start the system using the live CD? can someone help me solve this problem?

  • Printer in Windows 7 software

    MY79AH5093 Microsoft Windows 7 Home Premium 64 Setup USB cable / HP Photosmart C6280 all-in-one printer installation http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=MP-76043-1&LC=en&DLC=en&cc=us&... Download HP printer Here are