Running Task Service as User
When a Task is deployed it shows up on the worked as a service Appistry Task Service(My_app). By default the service runs as (log on as) Local System, is there way to change what the service runs as? I want to use a defined user account.
Good question and point, my current approach could likely be improved.
My app is monitoring the status of CloudIQ workers and taking actions based on if a worker is busy. Actions like dynamically moving workers from other mcast groups to the busy group, informing system admin, recording the level of work so actions can be taken later. I am currently using the System.Diagnostics.PerformanceCounter object which required admin rights to see computers other than yourself. It would be handy if I could access the status of workers using Appistry API.
I'm using c# if thats not apparent.
Although this will not provide you with resource usage statistics. We do have a query api that can be used in your task to help determine that status of the worker. You can read about this feature at Query Method.
That being said, I am now checking into other options.
wnordmann, if you are on CloudIQ 4.0+ then you can use our RESTful Management API to gather basic resource usage statistics by worker. These are fairly high level (CPU%, and memory available, memory total). Our RESTful Management APIs can do everything that fabric_ctl can do, plus additional features. And, of course, these APIs can be used from any language that can do HTTP calls, and parse JSON. If you need pointers to libs for doing this in C#, we can provide links.
Here is the RESTful Management API page:
http://www.appistry.com/community/wiki/display/latest/RESTful+Management...
For example, the GET resource "/fabric/performance-info" returns a JSON object that includes basic resource information for each worker:
{
"192.168.0.100" : {
"state" : "running",
"tps" : 0,
"cpu_percent" : 61,
"memory_available" : 1878116,
"memory_total" : 3405396,
"fam_space_capacity" : 0
},
"192.168.0.101" : {
...
},
...
}
The call is documented here:
http://www.appistry.com/community/wiki/display/latest/RESTful+Management...
Likewise, you can also get the information worker by worker with the GET resource "/workers/[ip]/performance-info"
Documented here:
http://www.appistry.com/community/wiki/display/latest/RESTful+Management...
There are calls to get a list of workers, and many other useful things including moving workers to/from fabrics.
One note. With 4.1, we adjusted how we measure available memory to make it more accurate of the actual state of things.
We intend to provide very detailed information in the future in and around what is actually happening in the task and process services. This will also be exposed via a RESTful API. The feature is planned, but the actual release schedule isn't available yet.
By the way, I'd love to know what statistics and other factors you are using to drive system policy decisions, what you feel is important, what you'd like to be using but can't because it's not available, etc. If you don't feel comfortable sharing that here, feel free to email me at guerry -at- appistry.com.
CPU percentage is all I want right now. And this looks like it'll work well, I'll let you know if I have any problems.
Thanks
wnordmann,
Can you describe to me why you are wanting to use a defined user account? The reason that I ask this is that the fabric itself does not have a direct mechanism to allow you to do so; however, there are ways to use the fabric to achieve the end goals that most users are looking for when they ask about running as a different user.
Thanks,
Mark