[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] eval() not working?



Sure, I think that would be great.

Thanks,
Evan

On Thu, Aug 28, 2014 at 12:46 PM, Brian Bockelman <bbockelm@xxxxxxxxxxx> wrote:
> Ah, ok, now I understand the original question.
>
> I haven't quite figured out the answer yet; however, should we just open a ticket to have these reported by default?
>
> Brian
>
> Sent from my iPhone
>
>> On Aug 28, 2014, at 11:11 AM, "Sarmiento, Evan" <esarmien@xxxxxxxxxxxxx> wrote:
>>
>> Hi Brian,
>>
>> I am using the built in cgroup support actually. What I'm trying to do
>> is have the Machine Slots advertise in Machine ClassAds their CGROUP
>> attributes, which they do not now (I think?)
>>
>> Best,
>> Evan
>>
>>
>>> On Thu, Aug 28, 2014 at 12:08 PM, Brian Bockelman <bbockelm@xxxxxxxxxxx> wrote:
>>> Hi Evan,
>>>
>>> Please allow me to be impertinent and not answer your question, but rather ask another question -
>>>
>>> Is there any reason why you can't use HTCondor's built-in cgroup support?  After a quick read-through, I don't see anything that you are reporting that's not in the built-in support.
>>>
>>> Thanks,
>>>
>>> Brian
>>>
>>>> On Aug 28, 2014, at 8:36 AM, Sarmiento, Evan <esarmien@xxxxxxxxxxxxx> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm running Condor 8.0.7--
>>>>
>>>> I made a custom set of Machine ClassAds which display CGROUP
>>>> parameters per slot, configuration below:
>>>>
>>>> #
>>>> # CGROUP Machine ClassAds
>>>> #
>>>>
>>>> STARTD_CRON_AUTOPUBLISH = If_Changed
>>>>
>>>> STARTD_CRON_JOBLIST =
>>>>
>>>> STARTD_CRON_JOBLIST = $(CRON_JOBLIST) cgroup
>>>>
>>>> STARTD_CRON_cgroup_PREFIX =
>>>> STARTD_CRON_cgroup_EXECUTABLE = /usr/local/HMDC/bin/condor_slot_cgroups
>>>> STARTD_CRON_cgroup_PERIOD = 5s
>>>> STARTD_CRON_cgroup_MODE = WaitForExit
>>>> STARTD_CRON_cgroup_RECONFIG = true
>>>> STARTD_CRON_cgroup_SLOTS =
>>>> STARTD_CRON_cgroup_ARGS = $(BASE_CGROUP)
>>>>
>>>> #
>>>> # STARTD ATTRS
>>>> #
>>>> #
>>>>
>>>> DYNAMIC_SLOT_ID = \
>>>> splitSlotName(Name)[0]
>>>>
>>>> MEMORY_USAGE_IN_BYTES = \
>>>> eval( strcat( toUpper(DYNAMIC_SLOT_ID), "_cgroup_memory_usage_in_bytes" ) )
>>>>
>>>>
>>>> SLOTD_SLOT_ATTRS = $(STARTD_SLOT_ATTRS), MEMORY_USAGE_IN_BYTES,
>>>> CGROUP_MEMORY_USAGE_IN_BYTES, DYNAMIC_SLOT_ID
>>>> STARTD_ATTRS = $(STARTD_ATTRS), MEMORY_USAGE_IN_BYTES,
>>>> CGROUP_MEMORY_USAGE_IN_BYTES, DYNAMIC_SLOT_ID
>>>>
>>>> #
>>>> # private IP
>>>> #
>>>> NETWORK_INTERFACE = <%= @hmdc_node_listen %>
>>>>
>>>> #
>>>> # We're a head node that also runs jobs
>>>> #
>>>> DAEMON_LIST = $(HMDC_COMPUTE_DAEMON_LIST)
>>>>
>>>> However, when I login to my collector, eval() doesn't seem to work--
>>>> check this out:
>>>>
>>>> [root@dev-cod6-head tmp]# condor_status -autoformat Dynamic_Slot_Id
>>>>
>>>> slot1
>>>>
>>>> slot1
>>>>
>>>> slot1_1
>>>>
>>>> -- This works, my Dynamic_Slot_Id is available for each slot
>>>>
>>>> This doesn't work:
>>>>
>>>> [root@dev-cod6-head tmp]# condor_status -long|grep MEM
>>>>
>>>> MEMORY_USAGE_IN_BYTES =
>>>> eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))
>>>>
>>>> MEMORY_USAGE_IN_BYTES =
>>>> eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))
>>>>
>>>> MEMORY_USAGE_IN_BYTES =
>>>> eval(strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes"))
>>>>
>>>>
>>>> [root@dev-cod6-head tmp]# condor_status -autoformat MEMORY_UAGE_IN_BYTES
>>>>
>>>> undefined
>>>>
>>>> undefined
>>>>
>>>> undefined
>>>>
>>>> -- Bugt oddly enough, this DOES work
>>>>
>>>> [root@dev-cod6-head tmp]# condor_status -autoformat
>>>> 'strcat(toUpper(DYNAMIC_SLOT_ID),"_cgroup_memory_usage_in_bytes")'
>>>>
>>>> SLOT1_cgroup_memory_usage_in_bytes
>>>>
>>>> SLOT1_cgroup_memory_usage_in_bytes
>>>>
>>>> SLOT1_1_cgroup_memory_usage_in_bytes
>>>>
>>>> And if I run
>>>>
>>>> [root@dev-cod6-head tmp]# condor_status -autoformat
>>>> SLOT1_1_cgroup_memory_usage_in_bytes
>>>>
>>>> 14090240
>>>>
>>>> 826781696
>>>>
>>>> 826781696
>>>>
>>>> This actually appears to work. I was trying to use eval() to actually
>>>> get the proper dynamic slot classad. Can anyone tell me what's going
>>>> on? Been banging my head against the wall for a day
>>>>
>>>> Best,
>>>> Evan
>>>> _______________________________________________
>>>> HTCondor-users mailing list
>>>> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
>>>> subject: Unsubscribe
>>>> You can also unsubscribe by visiting
>>>> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>>>>
>>>> The archives can be found at:
>>>> https://lists.cs.wisc.edu/archive/htcondor-users/
>>>
>>>
>>> _______________________________________________
>>> HTCondor-users mailing list
>>> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
>>> subject: Unsubscribe
>>> You can also unsubscribe by visiting
>>> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>>>
>>> The archives can be found at:
>>> https://lists.cs.wisc.edu/archive/htcondor-users/
>> _______________________________________________
>> HTCondor-users mailing list
>> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
>> subject: Unsubscribe
>> You can also unsubscribe by visiting
>> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>>
>> The archives can be found at:
>> https://lists.cs.wisc.edu/archive/htcondor-users/
>
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/