Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

free space on dataserver

5 posts in General Discussion Last posting was on 2009-09-01 14:32:41.0Z
vtpcnk Posted on 2009-09-01 13:29:33.0Z
Sender: 29fa.4a9d2121.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: free space on dataserver
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9d21bd.2a0e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 1 Sep 2009 06:29:33 -0700
X-Trace: forums-1-dub 1251811773 10.22.241.41 (1 Sep 2009 06:29:33 -0700)
X-Original-Trace: 1 Sep 2009 06:29:33 -0700, 10.22.241.41
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28249
Article PK: 77492

on a 2k page dataserver,

will sum((high - low)/512) from sysdevices for all data
devices

minus

the sum(size/512) from sysusages for all non log segmaps

give an approximation of the total available free space on a
dataserver?


"Mark A. Parsons" <iron_horse Posted on 2009-09-01 13:45:00.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: free space on dataserver
References: <4a9d21bd.2a0e.1681692777@sybase.com>
In-Reply-To: <4a9d21bd.2a0e.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 090828-0, 08/28/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a9d255c$1@forums-1-dub>
Date: 1 Sep 2009 06:45:00 -0700
X-Trace: forums-1-dub 1251812700 10.22.241.152 (1 Sep 2009 06:45:00 -0700)
X-Original-Trace: 1 Sep 2009 06:45:00 -0700, vip152.sybase.com
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28250
Article PK: 77494

Ummmmm ...

- why not count log entries from sysusages? log entries *do* represent used disk space

- assuming you have a reason to ignore log segments, how do you define 'non log segmaps' ... "segmap != 4", "segmap & 4
= 0", or some other means?

- for the sysdevices calculations you need to use "high - low + 1" (as opposed to "high - low")

- have you run your queries and compared them with the actual values returned from sp_helpdevice and sp_helpdb? ["When
in doubt, try it out."]

vtpcnk wrote:
> on a 2k page dataserver,
>
> will sum((high - low)/512) from sysdevices for all data
> devices
>
> minus
>
> the sum(size/512) from sysusages for all non log segmaps
>
> give an approximation of the total available free space on a
> dataserver?


vtpcnk Posted on 2009-09-01 13:58:20.0Z
Sender: 2a8a.4a9d255e.1804289383@sybase.com
From: vtpcnk
Newsgroups: sybase.public.ase.general
Subject: Re: free space on dataserver
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9d287c.2ada.1681692777@sybase.com>
References: <4a9d255c$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 1 Sep 2009 06:58:20 -0700
X-Trace: forums-1-dub 1251813500 10.22.241.41 (1 Sep 2009 06:58:20 -0700)
X-Original-Trace: 1 Sep 2009 06:58:20 -0700, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28251
Article PK: 77495


> - why not count log entries from sysusages? log entries
> *do* represent used disk space

which column in sysusages are you referring to?

>
> - assuming you have a reason to ignore log segments, how
> do you define 'non log segmaps' ... "segmap != 4", "segmap
> & 4 = 0", or some other means?

there are only 3 segmaps in my sysusages - 3,4 and another
one which has too little space allocated to it. so ...

> - for the sysdevices calculations you need to use "high -
> low + 1" (as opposed to "high - low")

yea i know that.

> - have you run your queries and compared them with the
> actual values returned from sp_helpdevice and sp_helpdb?
> ["When in doubt, try it out."]

i have run them and got some values. but have not compared
them though because there are too many dbs and devices on
the dataserver.


"Mark A. Parsons" <iron_horse Posted on 2009-09-01 14:32:41.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: free space on dataserver
References: <4a9d255c$1@forums-1-dub> <4a9d287c.2ada.1681692777@sybase.com>
In-Reply-To: <4a9d287c.2ada.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 090828-0, 08/28/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a9d3089$1@forums-1-dub>
Date: 1 Sep 2009 07:32:41 -0700
X-Trace: forums-1-dub 1251815561 10.22.241.152 (1 Sep 2009 07:32:41 -0700)
X-Original-Trace: 1 Sep 2009 07:32:41 -0700, vip152.sybase.com
Lines: 16
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28253
Article PK: 77496


vtpcnk wrote:
>> - why not count log entries from sysusages? log entries
>> *do* represent used disk space
>
> which column in sysusages are you referring to?
>
>> - assuming you have a reason to ignore log segments, how
>> do you define 'non log segmaps' ... "segmap != 4", "segmap
>> & 4 = 0", or some other means?
>
> there are only 3 segmaps in my sysusages - 3,4 and another
> one which has too little space allocated to it. so ...

Do you understand which entries in sysusages represent disk fragments containing log space?


"Mark A. Parsons" <iron_horse Posted on 2009-09-01 14:26:49.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: free space on dataserver
References: <4a9d255c$1@forums-1-dub> <4a9d287c.2ada.1681692777@sybase.com>
In-Reply-To: <4a9d287c.2ada.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 090828-0, 08/28/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a9d2f29$1@forums-1-dub>
Date: 1 Sep 2009 07:26:49 -0700
X-Trace: forums-1-dub 1251815209 10.22.241.152 (1 Sep 2009 07:26:49 -0700)
X-Original-Trace: 1 Sep 2009 07:26:49 -0700, vip152.sybase.com
Lines: 66
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28252
Article PK: 77500


vtpcnk wrote:
>> - why not count log entries from sysusages? log entries
>> *do* represent used disk space
>
> which column in sysusages are you referring to?

I'm not referring to any columns in sysusages, but rather your reason for throwing out some disk space usage numbers ...

In your original post you mentioned taking the sum of the sysusages entries "for all non log segmaps", ie, you're not
counting log entries in sysusages.

My reply was "why not count log entries"?

Ignore the log entries and you skew your final results.

>> - assuming you have a reason to ignore log segments, how
>> do you define 'non log segmaps' ... "segmap != 4", "segmap
>> & 4 = 0", or some other means?
>
> there are only 3 segmaps in my sysusages - 3,4 and another
> one which has too little space allocated to it. so ...

By ignoring some entries in sysusages you are choosing to ignore some disk usage numbers ... thus skewing your final
results.

>> - for the sysdevices calculations you need to use "high -
>> low + 1" (as opposed to "high - low")
>
> yea i know that.

Not according to your original post.

If your original post had a typo/mistake, no problem.

>> - have you run your queries and compared them with the
>> actual values returned from sp_helpdevice and sp_helpdb?
>> ["When in doubt, try it out."]
>
> i have run them and got some values. but have not compared
> them though because there are too many dbs and devices on
> the dataserver.

How do you expect to gain confidence in your query-writing skills if you don't validate the results of your query?

If you have 'too many' dbs and/or devices ...

- make sure you manually add the numbers (supplied by sp_helpdevice and sp_helpdb) a couple times to make sure you don't
make any mistakes with your addition and substraction

or

- write a script (probably easier with a *nux OS) to parse out the numbers (supplied by sp_helpdevice and sp_helpdb) and
then sum up said numbers

or

- verify your code against other programs/procs/queries that already generate the information that you're looking for;
in this case you could look at the source code for sp_helpdb and sp_helpdevice to see how they calculate their numbers;
then it should be a (relatively) easy step to modify the sp_helpdb/sp_helpdevice code to generate the desired sums (eg,
add a COMPUTE clause to the queries in question, or rewrite the queries to perform a sum() of the individual disk/db
numbers, etc)

'course, if you still plan on ignoring sysusages entries (ie, throwing away data) then you'll have to come up with some
other way to 'validate' your results.