[cisco-voip] SQL query to dump enterprise/system parameters

Anthony Holloway avholloway+cisco-voip at gmail.com
Fri Apr 20 10:42:01 EDT 2012


Wes,

Is there a way to programmatically detect a change in the T302 timer from
the default setting?  I would think that if there were, then we could have
a true report of which parameters have been modified, and which have not.

As you can see here, unlike the CDR Enabled flag, when I set the T302 timer
to the default value, it remains in the processconfig table:

*Non Default Setting*
admin:run sql select fkprocessnode, paramname, paramvalue from
processconfig where paramname = 'TimerT302_msec'
fkprocessnode                        paramname      paramvalue
==================================== ============== ==========
00000000-1111-0000-0000-000000000000 TimerT302_msec 8000

*Default Setting*
admin:run sql select fkprocessnode, paramname, paramvalue from
processconfig where paramname = 'TimerT302_msec'
fkprocessnode                        paramname      paramvalue
==================================== ============== ==========
00000000-1111-0000-0000-000000000000 TimerT302_msec 15000
admin:

When you look at the defaults in processconfigdefaults, one will notice
that these are only non-enterprise wide parameters.

However, while looking at the web interface, we can clearly see that CUCM
knows what the default value is for all parameters as indicated in the
"Suggested Value" column.

-Anthony

On Fri, Apr 20, 2012 at 7:39 AM, Wes Sisk <wsisk at cisco.com> wrote:

> the design was for defaults to be in defaults and non-default to be in
> config. however, that has not been strictly honored. you have to check both.
>
> On Apr 19, 2012, at 4:10 PM, Anthony Holloway wrote:
>
> There are two problems with this approach, and hopefully we can work
> through them together.
>
> *1) The table processconfigdefaults does not contain 100% of the
> variables found in processconfig.*
>
> I'll explain with an example of the T302 timer which has a default value
> of 15000 msec, and in my case I have changed it to 8000 msec.
>
> admin:run sql select paramname, paramvalue from processconfig where
> paramname = 'TimerT302_msec'
> paramname      paramvalue
> ============== ==========
> TimerT302_msec 8000
> admin:
>
> admin:run sql select paramname, paramvalue from processconfigdefaults
> where paramname = 'TimerT302_msec'
> paramname paramvalue
> ========= ==========
> admin:
>
>
> *2) The records contained within the processconfig table are dynamic
> based on whether or not they are set to defaults.*
>
> Here I have the current settings for my CDR Enabled flag, and as you can
> see it's set to non-default of On (or True) on three servers in my cluster:
>
> admin:run sql select fkprocessnode, paramname, paramvalue from
> processconfig where paramname = 'CdrEnabled'
> fkprocessnode                        paramname  paramvalue
> ==================================== ========== ==========
> 01670a90-9e3c-487a-a267-330f41e2ae0e CdrEnabled T
> 2e09aed9-1280-8bf5-a089-cedf97219a87 CdrEnabled T
> bf92c29d-3f94-759e-6623-40368135a0a1 CdrEnabled T
> admin:
>
> I will now turn the CDR Enable flag to the default of Off (or False) for
> the first node above (01670a90-9e3c-487a-a267-330f41e2ae0e) via the web
> administration page, and then run the SQL command again:
>
> admin:run sql select fkprocessnode, paramname, paramvalue from
> processconfig where paramname = 'CdrEnabled'
> fkprocessnode                        paramname  paramvalue
> ==================================== ========== ==========
> 2e09aed9-1280-8bf5-a089-cedf97219a87 CdrEnabled T
> bf92c29d-3f94-759e-6623-40368135a0a1 CdrEnabled T
> admin:
>
> Note that its record has now been removed from the table automatically.
>
>
> I haven't looked that hard for it, but is there a table which truly holds
> all of the defaults?  E.g., T302 timer
>
> -Anthony
>
> On Wed, Apr 11, 2012 at 9:18 AM, Peter Slow <peter.slow at gmail.com> wrote:
>
>> I think Kenneth will get mad at me for not making this public sooner, but
>> I was searching through my archives to find some other script that I'd
>> shared (at some earlier point)  and came across THIS request, for which I
>> happen to already have some awesomeness whipped up.
>>
>> enjoy,
>>
>> ###show me all the service parameter crap that isnt set to the default
>>
>> run sql \
>> SELECT PN.name AS CM_Name, TS.name AS Service_Name, PC.paramname AS
>> Parameter, PC.paramvalue AS Cur_Value, PCD.paramvalue  AS Default_Value
>> from processconfig PC \
>> JOIN processconfigdefaults PCD ON PCD.paramname LIKE PC.paramname \
>> JOIN processnode PN ON PN.pkid = PC.fkprocessnode \
>> JOIN typeservice TS ON TS.enum = PC.tkservice \
>> WHERE PCD.paramvalue != PC.paramvalue \
>> ORDER BY PN.name, PC.paramname
>>
>> add in an "AND TS.enum = whatever" if you only want to see the changed
>> parameters
>>
>>
>> example:
>>
>>
>> admin:run sql \
>> SELECT PN.name AS CM_Name, TS.name AS Service_Name, PC.paramname AS
>> Parameter, PC.paramvalue AS Cur_Value, PCD.paramvalue  AS Default_Value
>> from processconfig PC \
>> JOIN processconfigdefaults PCD ON PCD.paramname LIKE PC.paramname \
>> JOIN processnode PN ON PN.pkid = PC.fkprocessnode \
>> JOIN typeservice TS ON TS.enum = PC.tkservice \
>> WHERE PCD.paramvalue != PC.paramvalue \
>> ORDER BY PN.name, PC.paramname
>> cm_name        service_name      parameter
>> cur_value default_value
>> ============== ================= ===============================
>> ========= =============
>> 192.168.1.10  Cisco CallManager CdrEnabled                      T
>> F
>> 192.168.1.10  Cisco CallManager CdrLogCallsWithZeroDurationFlag T
>> F
>> 192.168.1.10  Cisco CTIManager  SdlTraceTotalNumFiles           250
>> 375
>> 192.168.1.100 Cisco CallManager CdrEnabled                      T
>> F
>> 192.168.1.100 Cisco CallManager SdlTraceTotalNumFiles           375
>> 250
>> 192.168.1.100 Cisco CTIManager  SdlTraceTotalNumFiles           250
>> 375
>> 192.168.1.11  Cisco CallManager CdrEnabled                      T
>> F
>> 192.168.1.11  Cisco CallManager CdrLogCallsWithZeroDurationFlag T
>> F
>> 192.168.1.11  Cisco CallManager SdlTraceTotalNumFiles           375
>> 250
>> 192.168.1.11  Cisco CTIManager  SdlTraceTotalNumFiles           250
>> 375
>>
>>
>>
>> enjoy,
>>     Peter Slow =)
>>
>>
>>
>>
>>
>>
>> On Thu, Feb 16, 2012 at 3:37 PM, Lelio Fulgenzi <lelio at uoguelph.ca>wrote:
>>
>>> Thanks Wes!
>>>
>>>
>>> ---
>>> Lelio Fulgenzi, B.A.
>>> Senior Analyst (CCS) * University of Guelph * Guelph, Ontario N1G 2W1
>>> (519) 824-4120 x56354 (519) 767-1060 FAX (ANNU)
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> Cooking with unix is easy. You just sed it and forget it.
>>>                               - LFJ (with apologies to Mr. Popeil)
>>>
>>>
>>> ------------------------------
>>> *From: *"Wes Sisk" <wsisk at cisco.com>
>>> *To: *"Lelio Fulgenzi" <lelio at uoguelph.ca>
>>> *Cc: *"cisco-voip voyp list" <cisco-voip at puck.nether.net>
>>> *Sent: *Thursday, February 16, 2012 2:34:17 PM
>>> *Subject: *Re: [cisco-voip] SQL query to dump enterprise/system
>>> parameters
>>>
>>>
>>> run sql select * from processconfig
>>> run sql select * from processconfigdefaults
>>>
>>> /wes
>>>
>>> On Feb 16, 2012, at 11:07 AM, Lelio Fulgenzi wrote:
>>>
>>>
>>> Is there an SQL query that I can run on the CLI to give me a fairly
>>> easily readable output of what the current enterprise and/or system
>>> parameters are?
>>>
>>> I still haven't figured out a way to print or take a visual snapshot to
>>> compare after work.
>>>
>>> Lelio
>>>
>>>
>>> ---
>>> Lelio Fulgenzi, B.A.
>>> Senior Analyst (CCS) * University of Guelph * Guelph, Ontario N1G 2W1
>>> (519) 824-4120 x56354 (519) 767-1060 FAX (ANNU)
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> Cooking with unix is easy. You just sed it and forget it.
>>>                               - LFJ (with apologies to Mr. Popeil)
>>>
>>>
>>> _______________________________________________
>>> cisco-voip mailing list
>>> cisco-voip at puck.nether.net
>>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>>
>>>
>>> _______________________________________________
>>> cisco-voip mailing list
>>> cisco-voip at puck.nether.net
>>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>>
>>>
>>
>> _______________________________________________
>> cisco-voip mailing list
>> cisco-voip at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>
>>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20120420/fb2f1687/attachment.html>


More information about the cisco-voip mailing list