Write ghost processes to db