"Roberto Tanara" <[EMAIL PROTECTED]> writes:
> The whole scan is very slow, compared to version 1.2.7, some
> plugins (below) are killed before finishing their job, and many of
> them shouldn't be there at all.
Please apply this quick and dirty patch to libnas/nasl/exec.c and
report us what you get (in nessusd.dump) for the slow plugins.
*** exec.c 23 Feb 2003 23:56:32 -0000 1.41
--- exec.c 25 Feb 2003 23:10:27 -0000
***************
*** 1695,1706 ****
--- 1695,1728 ----
if ((pf = get_func_ref_by_name(lexic, "on_exit")) != NULL)
nasl_func_call(lexic, pf, NULL);
+ #if 1
+ {
+ struct rusage ru;
+
+ if (getrusage(RUSAGE_SELF, &ru) < 0)
+ perror("getrusage");
+ else
+ {
+ nasl_perror(lexic, "rusage: utime=%d.%02d stime=%d.%02d maxrss=%d ixrss=%d idrss=%d isrss=%d minflt=%d majflt=%d nswap=%d inblock=%d oublock=%d msgsnd=%d msgrcv=%d nsignals=%d nvcsw=%d nivcsw=%d\n",
+ ru.ru_utime.tv_sec, ru.ru_utime.tv_usec / 10000,
+ ru.ru_stime.tv_sec, ru.ru_stime.tv_usec / 10000,
+ ru.ru_maxrss, ru.ru_ixrss, ru.ru_idrss, ru.ru_isrss,
+ ru.ru_minflt, ru.ru_majflt, ru.ru_nswap,
+ ru.ru_inblock, ru.ru_oublock,
+ ru.ru_msgsnd, ru.ru_msgrcv,
+ ru.ru_nsignals, ru.ru_nvcsw, ru.ru_nivcsw);
+ }
+
+ }
+ #endif
+
#if NASL_DEBUG > 3
nasl_dump_tree(ctx.tree);
#endif
nasl_clean_ctx(&ctx);
free_lex_ctxt(lexic);
chdir(old_dir);
+
return err;
}