Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Sun Apr 21, 2024 12:38 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
PostPosted: Fri Nov 30, 2007 8:51 am 
Offline
Newbie

Joined: Thu Nov 29, 2007 1:58 am
Posts: 3
The partition free space is reporting the C drive's free space for all partitions. It seemed to have worked okay in the first audit, but subsequent audits are having this issue. This also affects the "Partition free space less than 1000 MB" report.

It appears that audit.vbs is reporting the correct free space. I believe this issue lies in admin_pc_add_2.php, possibly in the insert_partition() function or in the parameters passed to it.

I am auditing from Windows XP SP2 and the Open-AudIT server is running on an Ubuntu Server 7.10 VM.

Example:
[code]
Hardware - FIONA
Partitions

Index:
Drive Letter: C:
Description: Local Disk
Boot Partition: False
Bootable: False
Size: 6,134 MB
Filesystem: NTFS
Free Space: 740 MB

Index:
Drive Letter: D:
Description: Local Disk
Boot Partition: False
Bootable: False
Size: 17,358 MB
Filesystem: NTFS
Free Space: 740 MB
[/code]
The actual free space for D: is ~9,000 MB.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 1:21 am 
Offline
Helper

Joined: Thu Jun 14, 2007 4:06 am
Posts: 96
Location: Georgia, USA
Can you test this? I think it might solve your problem.

viewtopic.php?f=8&t=1110&st=0&sk=t&sd=a&start=15#p11107


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 3:55 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
If this mod works, let me know and I will post the changes to the SVN, thanks.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 8:38 am 
Offline
Newbie

Joined: Thu Nov 29, 2007 1:58 am
Posts: 3
Thanks! That fixes the free space problem. Boot partition status also appears to be working better (discussed in viewtopic.php?f=8&t=2292&st=0&sk=t&sd=a&start=15).


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 8:46 am 
Offline
Newbie

Joined: Thu Nov 29, 2007 1:58 am
Posts: 3
This may be a separate issue: It appears disk usage graphs have issues when free disk space is below a certain point (perhaps 1,000 MB since all our disks with free space < 1,000 MB display incorrectly, and one with 1,592 MB displays correctly). For example, for one machine:

  • Drive: C

  • Partition Size: 6,134 MB

  • Current Free Space: 698 MB

  • Current Disk Used: 5,436 MB


[attachment=1] File comment: Pie chart:
Free: 11633.33%
Used: -11533.33%

system_graphs_pie.php.png
system_graphs_pie.php.png [ 1.13 KiB | Viewed 11377 times ]


[attachment=0] File comment: Partition: C: Percent Used: 89% Timestamp: 03 Dec 2007 15:59:14
system_graphs_image.php.png
system_graphs_image.php.png [ 103 Bytes | Viewed 11372 times ]


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 6:39 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
It works fine, but:
- I had to modify the following lines in audit.vbs to display correct boot info (removed the check <> "True"), because Bootable and BootPartition properties are language dependent and (for a non-english OS like mine) were always false:
[code]
partition_bootable = objDiskPartition.Bootable
if isnull(partition_bootable) then partition_bootable = "False" end if
partition_boot_partition = objDiskPartition.BootPartition
if isnull(partition_boot_partition) then partition_boot_partition = "False" end if
[/code]
- hidden partitions (partitions without logical drives) aren't listed. We discussed about it at viewtopic.php?f=8&t=2292&st=0&sk=t&sd=a#p9898 and you were able to fix it in a following post.
Thank you

_________________
Edoardo


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 04, 2007 7:03 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
These changes are starting to confuse me. (Not that that is particularly difficult :? )

I added the partition stuff in SVN 905, what else do I need to add to fix the remaining errors? Do I also need to add any of the above?

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 05, 2007 1:08 am 
Offline
Helper

Joined: Thu Jun 14, 2007 4:06 am
Posts: 96
Location: Georgia, USA
Here is the language mod EF suggested:

In audit.vbs, replace the entire Partition Information Section with this:

[code]'''''''''''''''''''''''''''
' Partition Information '
'''''''''''''''''''''''''''
comment = "Partition Info"
if verbose = "y" then
wscript.echo comment
end if

' Get the LogicalDisk's Path
strQueryFields = "DeviceID,Caption,FileSystem,FreeSpace,Size,VolumeName"
Set objEnumLogicalDisk = objWMIService.ExecQuery _
("Select " & strQueryFields & " from Win32_LogicalDisk where DriveType = 3", "WQL", 0)
' Get the DiskPartition's path
strQueryFields = "Bootable,BootPartition,DeviceID,DiskIndex,Index,PrimaryPartition"
Set objEnumDiskPartition = objWMIService.ExecQuery _
("Select " & strQueryFields & " from Win32_DiskPartition", "WQL", 0)

For Each objItem in objEnumLogicalDisk
partition_caption = objItem.Caption
partition_file_system = objItem.FileSystem
partition_free_space = 0
partition_free_space = int(objItem.FreeSpace /1024 /1024)
partition_size = 0
partition_size = int(objItem.Size /1024 /1024)
partition_volume_name = objItem.VolumeName
partition_percent = 0
partition_percent = round(((partition_size - partition_free_space) / partition_size) * 100 ,0)

' Associate with Device_ID in Win32_DiskPartition using objLogicalDiskToPartition

For Each objDiskPartition in objEnumDiskPartition
' This is expected to fail once in a while since we are
' concatonating a possible path to avoid hitting the floppy
On Error Resume Next
' Associate the two sets
Set objLogicalDiskToPartition = objWMIService.Get _
(Fixpath(objItem.Path_.relpath,objDiskPartition.path_.relpath), 0)
If Err.Number = 0 Then
partition_bootable = objDiskPartition.Bootable
if isnull(partition_bootable) then partition_bootable = "False" end if
partition_boot_partition = objDiskPartition.BootPartition
if isnull(partition_boot_partition) then partition_boot_partition = "False" end if
partition_device_id = objDiskPartition.DeviceID
partition_disk_index = objDiskPartition.DiskIndex
partition_index = objDiskPartition.Index
partition_primary_partition = objDiskPartition.PrimaryPartition
'wscript.echo objLogicalDiskToPartition.path_.relpath
splitpath = split(objLogicalDiskToPartition.path_.relpath,"=")
LogicalDisk_DeviceID = ""
'LogicalDisk_DeviceID = splitpath(ubound(splitpath))
LogicalDisk_DeviceID = splitpath(2)
LogicalDisk_DeviceID = replace(LogicalDisk_DeviceID,"\","")
LogicalDisk_DeviceID = replace(LogicalDisk_DeviceID,"""","")
'wscript.echo LogicalDisk_DeviceID & VBCRLF
Else
Err.Clear
End If
On Error Goto 0:
' END Associate with Device_ID in Win32_DiskPartition using objLogicalDiskToPartition
Next
form_input = "partition^^^" & partition_bootable & "^^^" & partition_boot_partition & "^^^" _
& partition_device_id & "^^^" & partition_disk_index & "^^^" _
& partition_index & "^^^" & partition_percent & "^^^" _
& partition_primary_partition & "^^^" & partition_caption & "^^^" _
& partition_file_system & "^^^" & partition_free_space & "^^^" _
& partition_size & "^^^" & partition_volume_name & "^^^"
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""
Next[/code]

EF can you verify so we can have this added to the SVN?


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 05, 2007 3:25 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Added to SVN 906. Try it now. :oops: I mean try it now SVN 908

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 05, 2007 6:31 pm 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
Thank you jpmorgan and Andrew, this is OK for me.

_________________
Edoardo


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 12, 2009 9:42 am 
Offline
Newbie
User avatar

Joined: Wed Apr 02, 2008 8:45 am
Posts: 21
Apologies if this is covered elsewhere I have not found it anywhere else. All of my drive usage graphs show the same usage as there is free space.


Attachments:
Capture.PNG
Capture.PNG [ 11.95 KiB | Viewed 11054 times ]

_________________
Jon
The Tech Guy
http://www.thetechguyusa.com
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group