Hean,

if you purge usage_job you'll need to stop/start the usage server.
usage_event are repopulated from the cloud-database, don't purger them
there and the cloud_usage.cloud_event table will get repopulated.
usage_network is an intermediary table, you can truncate it and it will be
filled again. It does not contain a final result however.

On Thu, Mar 18, 2021 at 11:31 AM Hean Seng <heans...@gmail.com> wrote:

> Hi Abhishek,
>
> The timezone is correct ,  now is on GMT .
>
> Can I know if this table, usage_job,  usage_events , and usage_network
> table are  able to manual purge it ?
>
> I am thinking to puge it and let he repopulate again see
>
>
>
>
>
>
> On Thu, Mar 18, 2021 at 6:24 PM Abhishek Kumar <
> abhishek.ku...@shapeblue.com>
> wrote:
>
> > Hi,
> >
> > You may check usage aggregation and execution timezone values (global
> > configs - usage.aggregation.timezone, usage.execution.timezone).
> > Go through this blog if it helps
> > https://www.shapeblue.com/cloudstack-usage-service-deep-dive/
> > [https://www.shapeblue.com/wp-content/uploads/2013/05/blog1.png]<
> > https://www.shapeblue.com/cloudstack-usage-service-deep-dive/>
> > CloudStack Usage Service | CloudStack Feature Deep Dive - The CloudStack
> > Company<https://www.shapeblue.com/cloudstack-usage-service-deep-dive/>
> > Introduction CloudStack usage is a complimentary service which tracks end
> > user consumption of CloudStack resources and summarises this in a
> separate
> > database for reporting or billing. The usage database can be queried
> > directly, through the CloudStack API, or it can be integrated into
> external
> > billing or reporting systems. For background information on the usage
> > service […]
> > www.shapeblue.com
> > Regards,
> > Abhishek
> > ________________________________
> > From: Hean Seng <heans...@gmail.com>
> > Sent: 16 March 2021 12:38
> > To: users@cloudstack.apache.org <users@cloudstack.apache.org>
> > Subject: Strange Behaviour of Usage Job
> >
> > Hi
> >
> > I am facing strange behaviour of Usage Job  ,
> >
> > table usage_job
> >
> > id : 8998
> >
> > Host: xxxx
> >
> > pid : 964941
> >
> > job_type : 1
> >
> > scheduled: 0
> >
> > start_millis : 1615870800000
> >
> > end_millis: 1615870799999
> >
> > exec_time 2
> >
> > start_date 2021-03-16 05:00:00
> >
> > end_date: 2021-03-16 04:59:59
> >
> > success: 0
> >
> > heartbeat: 2021-03-16 05:02:57
> >
> > And this job record fail due to  end_date before start date .
> >
> > Anybody caa help me on what issue,   there is many of this fail job over
> > the db record of usage_job table .
> >
> > --
> > Regards,
> > Hean Seng
> >
> > abhishek.ku...@shapeblue.com
> > www.shapeblue.com
> > 3 London Bridge Street,  3rd floor, News Building, London  SE1 9SGUK
> > @shapeblue
> >
> >
> >
> >
>
> --
> Regards,
> Hean Seng
>


-- 
Daan

Reply via email to