Exemple #1
0
    def _is_flash_running(self):
        """Check if a Shockwave Flash process is running.

        @returns: True if one or more flash processes are running.
        """
        flash_pids = utils.get_process_list('chrome', '--type=ppapi')
        return flash_pids != []
Exemple #2
0
 def kill_flash_process():
     """Kill all running flash processes."""
     pids = utils.get_process_list('chrome', '--type=ppapi')
     for pid in pids:
         try:
             utils.nuke_pid(int(pid))
         except error.AutoservPidAlreadyDeadError:
             pass
     return pids
Exemple #3
0
def hello():
    our_response = render_template(
        'show_stats.html', 
        cpu_data=enumerate(get_cpu_stats()),
        mem_data=get_memory_stats(),
        process_list=get_process_list(),
        comments=(Commentage.query.all()),
    )

    return our_response
Exemple #4
0
def hello():
    our_response = render_template(
        'show_stats.html',
        cpu_data=enumerate(get_cpu_stats()),
        mem_data=get_memory_stats(),
        process_list=get_process_list(),
        comments=(Commentage.query.all()),
    )

    return our_response
Exemple #5
0
def download_csv():
    process_list = get_process_list()
    process_stio = StringIO.StringIO()

    w = csv.writer(process_stio)
    w.writerows(process_list)

    res = make_response(process_stio.getvalue())
    res.headers['Content-Type'] = 'text/csv'
    res.headers['Content-Disposition'] = 'attachment; filename=export.csv'
    return res
def download_csv():
    process_list = get_process_list()
    process_stio = StringIO.StringIO()

    w = csv.writer(process_stio)
    w.writerows(process_list)

    res = make_response(process_stio.getvalue())
    res.headers['Content-Type'] = 'text/csv'
    res.headers['Content-Disposition'] = 'attachment; filename=export.csv'
    return res
    def _is_flash_running(self):
        """
        Check if a Flash process is running.

        @returns: True if one or more flash processes are running.

        """
        try:
            utils.poll_for_condition(
                lambda: utils.get_process_list('chrome', '--type=ppapi'))
        except utils.TimeoutError:
            return False

        return True
def hello():
    our_response = render_template(
        'show_stats.html', 
        cpu_data=enumerate(get_cpu_stats(
            app.config['CPU_SAMPLER_TIME'])),
        mem_data=get_memory_stats(),
        process_list=get_process_list(),
        comments=(Commentage.query.all()),
        cpu_history=(

            CpuStats.query.order_by(
                CpuStats.created.desc()
            ).limit(50)
            
        ),
    )

    return our_response