Openstack Horizon Fetch Instances - openstack

I would like to fetch all instances and calculate the uptime of the vcpu ram etc.
upon checking out the existing horizon code which sits at openstack_dashboard/dashboard/usage
usage = api.nova.usage_get(self.request, self.tenant_id, start, end)
I have searched the internet for a documentation for it but i am so unlucky to find one. ,
I would like to know what will be in the arguments start and end.
Thanks, I hope someone who could lead me into this.

You can debug your horzion with ./manage.py shell

Related

IIS is hanging and needs to be recycled every time?

We've one IIS application server on which we have deployed ASP.NET application.
Now the issue is Server is hanging very frequently and every time we are recycling or restarting application pool. Could you please help me to fix it.
What I've tried:
1) Looked into IIS log and found that there are few requests throwing 500 error some time. All the time except few instances same requests are working fine and getting 200 status.
2) Few resources are taking longer time like
a) "Report.aspx" - State- SendResponse - Time Elapsed- 2-3 minutes
I checked the query and found that sp is returning data in 00:00:02.
b) "NewReport.aspx" - State- ExecuteRequestHandler- Time Elapsed- 1 minutes
I checked the query and found that sp is returning data too quickly.
3) Default recycle time is 29 hrs, and each application is using individual pool.
4) In code application connection has been opened and not closed at very few places.
5) We are using connection pooling, having 2 different connection string with Max Pool=500 and min Pool=50 each.
6) Most of the time there is no error in Event Viewer, some time have received TCP/IP error.
What I am looking for:
1) Do I need to make any changes in IIS to track down or please help if any changes required in IIS?
2) Is there any setting in SQL Server which can help me to find out or fix it?
3) Please help if anything else I've to do to fix this issue from your previous experiences.
I think you should capture a hang dump for W3WP.exe with Procdump or debug diagnostic tool first. We need to check all managed stack trace via WINDBG, sos.dll and mex extension. So that we can figure out worker thread is pending on which method and which module. Then might tell us about how to fix this hang issue. If you could find a way to always reproduce this problem. The problem would become much easier.
This link is about how to capture hang dump.
https://blogs.msdn.microsoft.com/asiatech/2014/01/09/debug-diagnostic-2-0-generate-a-manual-hang-dump-for-all-processes-owned-by-iis/
If you don't know how to analyze dump file manually, debug diagnostic analysis tool could help you achieve this.

google cloud compute load balancer 504 error

I have the following setup.
2 x gce n1.standard instances running nginx/php5-fpm
1 x cloud SQL d8 instance with both GCE instances connected
to it.
The front end servers are running a stripped down version of osCommerce-2.3.3.4 with NO admin section on the front end. Its just the catalog portion of osC.
I ran a load test with load impact, and the site is unusable at around 50-100 users. I am only looking to support at absolute max 500/users at any give time. We average around 130-170 on our current server.
I am not looking for a complete explanation but any helpful places to check, things to try, stuff to read, I just need a direction to go in to get this cloud platform working like we wanted.
Thanks in advance.

Indefinite Provisioning of EMR Cluster with Segue in R

I am trying to use the R package called Segue by JD Long, which is lauded as the ultimate in simplicity for using R with AWS by a book I read called "Parallel R".
However, for the 2nd day in a row I've run into a problem where I initiate the creation of a cluster and it just says STARTING indefinitely.
I tried this on OS X and in Linux with clusters of sizes 2, 6, 10, 20, and 25. I let them all run for at least 6 hours. I have no problem starting a cluster in the AWS EMR Management Console, though I have no clue how to connect Segue/R to a cluster that was started in the Management Console instead of via createCluster().
So my question is -- is there either some way to trouble shoot the provisioning of the cluster or to bypass the problem by creating the cluster manually and somehow getting Segue to work with that?
Here's an example of what I'm seeing:
library(segue)
Loading required package: rJava
Loading required package: caTools
Segue did not find your AWS credentials. Please run the setCredentials() function.
setCredentials("xxx", "xxx")
emr.handle <- createCluster(numInstances=10)
STARTING - 2013-07-12 10:36:44
STARTING - 2013-07-12 10:37:15
STARTING - 2013-07-12 10:37:46
STARTING - 2013-07-12 10:38:17
.... this goes on for hours and hours and hours...
UPDATE##: After 36 hours and many attempts that failed, this began working (randomly...) when I tried it with 1 node. I then tried it with 10 nodes and it worked great. To my knowledge nothing changed locally or on AWS...
I am answering my own question on behalf of the AWS support rep who gave me the following belated explanation:
The problem with the EMR creation is with the Availability Zone specified (us-east-1c), this availability zone is now constrained and doesn't allow the creation of new instances, so the job was trying to create the instances in a infinite loop.
You can see information about constrained AZ here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions-availability-zones
"As Availability Zones grow over time, our ability to expand them can become constrained. If this happens, we might restrict you from launching an instance in a constrained Availability Zone unless you already have an instance in that Availability Zone. Eventually, we might also remove the constrained Availability Zone from the list of Availability Zones for new customers. Therefore, your account might have a different number of available Availability Zones in a region than another account."
So you need to specify another AZ, or what I recommend is not specify any AZ, so EMR is going to be able to select any available.
I found this thread: https://groups.google.com/forum/#!topic/segue-r/GBd15jsFXkY
on Google Groups, where the topic of availability zones came up before. The zone that was set as the new default in that thread was the zone causing problems for me. I am attempting to edit the source of Segue.
Jason, I'm the author of Segue so maybe I can help.
Please look under the details section in the lower part of the AWS console and see if you can determine if the bootstrap sequences completed. This is an odd problem because typically an error at this stage is pervasive across all users. However I can't reproduce this one.

Initiate an outgoing call with Asterisk

I have a database where one entry is structured like so:
number_to_call date file_to_play
Using asterisk, I need to do the following:
1. Check the database daily.
2. If date matches that of today's, then initiate call on number.
3. Once phone has been picked up, play file_to_play.
Some general pointers on how I even begin to do this would be great.
Most of the applications that I have written so far have worked on incoming calls. I have the following questions:
1. How do I write a "daemon" that will check the database? Asterisk should have both user and group privileges for it to execute properly. How do I do this?
2. Can I initiate an outgoing call from outside of the asterisk dialplan?
The calls are being made to a PSTN/mobile number.
You can Write any script Which can check DB on daily basis and once it maches the date range you can initiate a call using .call files.
Please study asterisk auto-dial out from voip-info.org - I think you can understand better then.
You can run your script for same user as asterisk runs there is also one more method to initiate call from linux which we can call Originate CLI command which can also refer to http://voip-info.org/.
In general it is not a great idea to write your own dialer, unless your volume is very very low. Where I work, we started rolling our own but at the end went with a commercial solution that handled most of the logic. There are a number of commercial and free solutions out there, so don't reinvent the wheel.
See my answer to https://stackoverflow.com/questions/11666755/outbound-dialer-using-asterisk/14589901#14589901 for why it is not a good idea to roll your own.

Process scheduler runtime parameter

Can anyone recommend a fairly clean method for determining the process scheduler an app-engine is running on at run-time (NT or UNIX). I need to set a file path that is obviously dependent upon the server the process is being executed on. I understand the GetEnv command can be used, but I don't want to set an environment variable for this particular instance (it does not reside under the PS_FILES) path. I've searched peoplebooks for any kind of built in function or system variable, but was not successful (obviously).
Any suggestions would be appreciated.
Thanks
Okay, I may have asked this question a little too early. I apologize.
It looks like I'll just be able to query the process request table to pull back the server name:
SQLExec("SELECT SERVERNAMERUN FROM PSPRCSRQST WHERE PRCSINSTANCE = :1", &thisProcess, &server);
Evaluate &server
When.......
End-Evaluate;
Exactly :-)
There are a host of Process Request records that can give you the information you need. Glad that you found it.
John

Resources