On 6/28/23 11:34, Nicolas FORMICHELLA wrote:
Jun 28, 2023 17:19:15 Joe Salmeri <jmscdba@gmail.com>:

On 6/28/23 11:02, Thorsten Kukuk wrote:
On Wed, Jun 28, Simon Becherer wrote:

hi thorsten,
sorry still unclear to me:

i have never disabled or changed requires/recomends
wtmpdb is not installed.
so the services are not on my systems.
MUST i now install wtmpdb AND after this enable the services ?
OR
did i have to do nothing and everithing works as it should?
Maybe you have a very old system, where the current base patterns are
not installed. In this case, new core packages will not be installed,
too.

"zypper in wtmpdb" will install it, and if your system is up-to-date,
the services should be automatically enabled.

  Thorsten
Hi Thorsten,

My system was installed 03/2021 and I am a few builds back running 20230616.

The wutmpdb package installed, but wtmpdb-rotate.timer and wtmpdb-update-boot.service are both disabled.

Should I enable both ( as you mentioned ) or will that happen when I update to the latest build ?

One thing I noticed is that "last -s 2023-06-28" works properly and returns since midnight, whereas "wtmpdb last -s 2023-06-28" returns "Invalid time value 2023-06-28".

man wtmpdb says ( so that explains it )

    TIME must be in the format *"YYYY-MM-DD HH:MM:SS"*.

but it would be nice if it would default the time like last does.

Thanks!

-- 
Regards,

Joe
One thing I noticed is that "last -s 2023-06-28" works properly and returns since midnight, whereas "wtmpdb last -s 2023-06-28" returns "Invalid time value 2023-06-28".
While you need to put the full hour:min:sec, you need to enclose the format in double quotes for it to work at all

Like `wtmpdb last -s "2023-06-28 00:00:00"` will work, while `wtmpdb last -s 20  23-06-28 00:00:00` won't


Nicolas
Correct because the date time format has a space in it.   I was suggesting that they default to midnight like last currently does.

Another issue is that 

last -s "2023-06-28 00:00:00"        
	
	Returns
	
	joe      pts/4        :0               Wed Jun 28 01:00 - 01:00  (00:00)
	
	wtmp begins Sun May 14 00:42:54 2023

whereas 


wtmpdb last -s "2023-06-28 00:00:00"

	Returns

	/var/lib/wtmpdb/wtmp.db begins Mon May 15 12:51:46 2023

This could be because I am still on 20230616 and it has in one of the 9 newer TW builds, but if it hasn't then it appears to be a bug.


-- 
Regards,

Joe