8
голосов
4ответов
3948 просмотров

Как использовать вывод cachegrind для оптимизации приложения

Мне нужно увеличить пропускную способность системы. Обычный цикл оптимизации завершен, и мы уже достигли увеличения производительности в 1,5 раза. Теперь я начинаю задаваться вопросом, могу ли я использовать вывод cachegrind для повышения пропускной способности системы. Может кто-нибудь...

0
голосов
2ответов
4686 просмотров

Несколько программ используют один и тот же порт UDP?Возможно?

В настоящее время у меня есть небольшой скрипт Python, который я использую для создания нескольких исполняемых файлов (серверов голосового чата), а в следующей версии программного обеспечения серверы имеют возможность получать контрольные сигналы через порт UDP. (Возможно, на одной машине будут ...

2
голосов
6ответов
869 просмотров

Как имитировать функциональность DropBox с помощью скрипта Ruby?

Я хотел бы загружать документы в GoogleDocs каждый раз, когда ОС слышит, что файл был добавлен / перетащен / сохранен в указанной папке, точно так же, как DropBox загружает файл, когда вы сохраняете его в папке DropBox. Что для этого нужно в Ruby, какие части? Как вы отслеживаете, когда ф...

0
голосов
2ответов
1200 просмотров

Почему мой демон Python загружает весь мой процессор во время сна?

Я использую этот рецепт: http://code.activestate.com/recipes/278731/ на сервере Ubuntu. Я создаю экземпляр демона следующим образом: class MyDaemon(Daemon): def run(self): while True: try: do_my_data_processing() except MySQLdb.Op...

1
голосов
3ответов
1316 просмотров

Daemon dies unexpectedly

I have a python script, which I daemonise using this code def daemonise(): from os import fork, setsid, umask, dup2 from sys import stdin, stdout, stderr if fork(): exit(0) umask(0) setsid() if fork(): exit(0) ...

2
голосов
1ответов
1241 просмотров

stateful processes (daemons?) in Tomcat?

I'm not exactly sure what question to ask here since I don't know the vocabulary... Tomcat servlets (and any server for that matter) work nicely if they are stateless and respond quickly to requests, with state stored in a database. It seems like if I have long-running operations then maybe I wa...

2
голосов
3ответов
917 просмотров

Threads in a Java EE application

I have a Java EE application that has two components: First is a service that scrapes some information from internet and fills it into database. Second is a web interface (deployed on tomcat) from where user can browse that information. What could be the best approach to implement the first comp...

2
голосов
1ответов
4715 просмотров

developing a osx deamon that runs before user login using xcode

Hi I am trying to develop a daemon using objective-C/xcode. I am new to mac world and can I get an idea of what project template to choose in xcode and how to do it. Can I get a simple and basic daemon sample source code ?

3
голосов
7ответов
1565 просмотров

Is it a bad idea to write a multithreaded TCP server daemon in Perl?

Is it a bad idea to write multithreaded programs (specifically, TCP server daemons) in Perl?

11
голосов
3ответов
12133 просмотров

Executor and Daemon in Java

I have a MyThread object which I instantiate when my app is loaded through the server, I mark it as a Daemon thread and then call start() on it. The thread is meant to sit and wait for information from a queue as long as the application is active. My problem/question is this: Currently MyThread i...

0
голосов
2ответов
1863 просмотров

How to tell the status of a Linux Daemon

We have a Linux Daemon in c and a bash script to start it. The daemon sometimes fail to start because of some configuration file errors but the script reports the daemon was started successfully. A snippet of the script is shown as below, could someone tell me what's wrong with the script? ... c...

5
голосов
7ответов
18372 просмотров

How to implement Daemon process for background task in iphone sdk 3.0?

Like qik.com or ustream.com , when they upload content from iphone to server , it works via daemon . So even when out of the app with exit , the task is still on with background daemon . Is there any method that I can implement daemon process in a same way ? Thanks !!!

11
голосов
1ответов
6208 просмотров

What difference it makes when I set python thread as a Daemon

What difference makes it when I set a python thread as a daemon, using thread.setDaemon(True)?

5
голосов
4ответов
5486 просмотров

delayed_job not picking up the rails environment

Followed this question about delayed_job and monit Its working on my development machine. But whenever I try to run on production, it just dies with following on delayed_job.log *** Starting job worker delayed_job host:mail.welcometonewnepal.com pid:356 #<Mysql::Error: Access denied for user...

0
голосов
1ответов
1126 просмотров

Ruby daemon not working

I need to run a standalone ruby script as Unix (linux) daemon. After running that daemon I need to run another Ruby method with it. I installed the ruby-daemon gem on my machine by using the gem install daemon. I did the test daemon program. My test.rb file is : module Test def test_met...

6
голосов
6ответов
4485 просмотров

Error while using multiprocessing module in a python daemon

I'm getting the following error when using the multiprocessing module within a python daemon process (using python-daemon): Traceback (most recent call last): File "/usr/local/lib/python2.6/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/usr/local/lib/python2.6/multi...

0
голосов
1ответов
834 просмотров

Pass data to mailer daemon in Rails?

According to the Rails API (snippet below), the optimal way to receive mail is by creating a single Rails instance within a daemon that gets invoked by a MTA whenever new mail arrives. My question is: how do you pass data to that daemon when new mail arrives? ======================== Rails API...

3
голосов
2ответов
142 просмотров

What python modules are available to assist in daemonization in the standard library?

I have a simple python program that I'd like to daemonize. Since the point of my doing this is not to demonstrate mastery over the spawn, fork, disconnect , etc, I'd like to find a module that would make it quick and simple for me. I've been looking in the std lib, but can not seem to find any...

1
голосов
5ответов
3313 просмотров

Debugginng a daemon that terminates unexpectedly

I am writing a daemon in c on linux. It traps signals SIGHUP, SIGTERM, SIGINT, and SIGQUIT, logs them using syslog and quits. If it receives SIGSEGV it core dumps. When these occur everything happens as expected but once in a while it quits...does not exit cleanly, does not log the signal, and do...

18
голосов
3ответов
17633 просмотров

Tool for creating a Java daemon service on Linux

What is the best way to create a java application that can be run using ‘service’ on Linux? I was going to use the JSW available here, but cannot use the licence on that (licence is either GPL or it costs money as far as I can tell). I’d need an apache style licence. I’m using maven to build, so...

0
голосов
1ответов
3652 просмотров

Java Service Wrapper 3.2.3 on Mac OS X 64-bit

What's the best way to run an app using Java Service Wrapper 3.2.3 on Mac OS X 64-bit? sh.script.in works, but there is no macosx-universal-64 version of the wrapper native binary (on JSW's 3.2.3 downloads page anyway http://wrapper.tanukisoftware.org/downloads/3.2.3/). The result is the follow...

3
голосов
2ответов
1153 просмотров

Why doesn't my program write to the file while using Proc::Daemon?

I write some testing code before using Proc::Daemon, what my testing code is like: #! /usr/bin/perl use strict; use warnings; use Proc::Daemon; Proc::Daemon::Init(); my $continue = 1; $SIG{TERM} = sub { $continue = 0 ; } while ( $continue ) { sleep(5) ; &greeting ; } sub greeting...

0
голосов
3ответов
538 просмотров

How can I prevent an error in my Perl script from terminating the script?

I have a simple Perl script which runs as a Linux daemon using an infinite loop. It connects to a database every 10 seconds to execute a process. while (1) { # THIS LINE WILL KILL THE SCRIPT IF IT FAILS my $DB=DBI->connect("dbi:Sybase:server=myserver","user","password"); . . . do ...

6
голосов
4ответов
13454 просмотров

How do I create daemon threads?

Can a java programmer can create daemon threads manually? How is it?

3
голосов
2ответов
4478 просмотров

Best practices creating Java service or daemon scripts

I'm looking for a tool to run java server processes as daemon services in Linux (and potentially on Windows and other OS's). I'm looking for the best practices when it comes to how to build production capable scripts and launch configuration. I'm familiar with best practices when it comes to a p...

1
голосов
1ответов
598 просмотров

How do i stop a particular ruby daemons?

For the daemons' options :multiple => true , so, It allows me to start multiple instance of background process. now, when run command stop it stop all background processes, How can i stop them individually? Note: I know we can kill by pid but i want the ticker to at_exit as well.

3
голосов
2ответов
1466 просмотров

Paste (Python) Web Server - Autoreload Problem

When I start the `Paste' web server in daemon mode, it seems to kill off it's ability to reload when the timestamp of a source file is updated. Here is how I start the daemon... cd ${project} && ../bin/paster serve --reload --daemon development.ini; cd ..; ...which defeats one of the ...

0
голосов
1ответов
550 просмотров

Very strange behaviour when launching Ruby daemons from bash script upon boot

I am using Rightscale to launch an instance on Amazon EC2. All my boot scripts work great and do things like getting the below file names in the folders. The last boot script is the following: #!/bin/bash MAINDIR="/root/username/" ruby ${MAINDIR}insertfd_control.rb stop ruby ${MAINDIR}inse...

5
голосов
7ответов
8262 просмотров

best way to write a linux daemon

For work i need to write a tcp daemon to respond to our client software and was wondering if any one had any tips on the best way to go about this. Should i fork for every new connection as normally i would use threads?

304
голосов
7ответов
426128 просмотров

How to start a background process in Python?

I'm trying to port a shell script to the much more readable python version. The original shell script starts several processes (utilities, monitors, etc.) in the background with "&". How can I achieve the same effect in python? I'd like these processes not to die when the python scripts compl...